Forum Discussion
Dhiran Gajjar
Jun 09, 2023Iron Contributor
Accesing JSON body elements
Hi,
I have an HTTP Sharepoint step which produces a output like this and I would like to access the ErrorCode value in the next compose step. I can get the d: value by using
"body('JSON')?['d']"
but if I try
body('JSON')?['d']?['results'][0], I dont get anything.
Any ideas why?
{
"d": {
"ValidateUpdateListItem": {
"__metadata": {
"type": "Collection(SP.ListItemFormUpdateValue)"
},
"results": [
{
"ErrorCode": 0,
"ErrorMessage": null,
"FieldName": "FirstPublishedDate",
"FieldValue": "2023-06-01 22:30:00",
"HasException": false,
"ItemId": 43
}
]
}
}
}
- Hi,
Fixed it. Found out that Results was not part of d: but ValidateUpdateListItem.
1 Reply
Sort By
- Dhiran GajjarIron ContributorHi,
Fixed it. Found out that Results was not part of d: but ValidateUpdateListItem.