Hi All,
I have to get the list items in SharePoint and load it to synapse.
What I have done till now is this:
import json
import sharepy
s = sharepy.connect("https://mysite.sharepoint.com", username="username", password="password")
r = s.get("https://mysite.sharepoint.com/_api/web/lists/GetByTitle('ListName')/items")
data = json.loads(r.text)
dict1 = {}
for i in data['d']['results']:
dict1['Title'] = i['Title']
dict1['Date Requested'] = i['DateRequested']
dict1['Requestor'] = i['RequestorId']
dict1['Date Due'] = i['DateDue']
dict1['Status'] = i['Status']
dict1['CategoryId'] = i['CategoryId']
dict1['Request Type'] = i['Request_x0020_TypeId']
I login to Sharepoint and get my list items and load it as json format into data variable and wants to fetch some values from that json.
But the issue is that the header "Requestor" is a name of a person which is what we select from drop down but in json it comes as an integer number and similary I have a Field with LookUp Value. So basically what I have is Microsoft.SharePoint.Client.FieldLookupValue and Microsoft.SharePoint.Client.FieldUserValue.
How can i extract the actual data instead of these numeric or formulas? Thanks
Ashish