My problem is that when I get the value of the lookup field ('Attachment') its retrieved as an array and I don't know how to deal with it, I mean how do I get the values inside this array, so any suggestions?
Here is the call function I use:
private _getListItems(): Promise<IAnnouncementItem[]> {
return this.context.spHttpClient.get(
this.context.pageContext.web.absoluteUrl + `/_api/web/lists/getbytitle('Circulations')/items?$select=ID,Attachment/ID&$expand=Attachment`,
SPHttpClient.configurations.v1)
.then(response => {
debugger;
return response.json();
})
.then(jsonResponse => {
return jsonResponse.value;
}) as Promise<IAnnouncementItem[]>;
}