Having issue in reading only the parent folders from sharepoint library. RRS feed

  • Question

  • I am developing a custom web part using SPFX, where i am facing issues related to read all parent folders from an specific Sharepoint library. The name of my document library is "Documents" from where i have to get all the parent folders. 

    Following is the code, i am using, the data that is returned doesn't have folder names, url to the folder and not also any property that could correspond to the folders.

    this.context.spHttpClient.get(`${this.context.pageContext.web.absoluteUrl}/_api/web/lists/getByTitle('Documents')/items`, SPHttpClient.configurations.v1) .then((data: SPHttpClientResponse) => { console.log(data);return data.json() });

    kindy provide guidance/working solution either using standard js or pnp.js.

    Thank you. 
    • Edited by QaziTanzeel Monday, September 21, 2020 6:05 PM Code issues
    Monday, September 21, 2020 6:03 PM

All replies