Question

i want to get data to WebPart from the SharePoint list. but some of the data are eg. PeoplePicker or Multiple line of text and I have result shown as:

<div class="ExternalClass87D2C35DDC814159BCA3F4ACC1BFBC35"><p>Normal Text</p></div>

and here comes my question. How i can parse json response from spHttpClient to array, so later i can delete non usuable data?

I'm using the code below to get data

> private _getMultiLineData(): Promise<IDetailsListItem[]> {
>     return this.context.spHttpClient.get(
>     `URL`,
>     SPHttpClient.configurations.v1)
>     .then(response => {
>     return response.json();
>      })
>      .then(jsonResponse => {
>        return jsonResponse.value;
>      }) as Promise<IDetailsListItem[]>;  }

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top