SOLVED

Accesing JSON body elements

Iron Contributor

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
        }
      ]
    }
  }
}

 

 

1 Reply
best response confirmed by Dhiran Gajjar (Iron Contributor)
Solution
Hi,
Fixed it. Found out that Results was not part of d: but ValidateUpdateListItem.
1 best response

Accepted Solutions
best response confirmed by Dhiran Gajjar (Iron Contributor)
Solution
Hi,
Fixed it. Found out that Results was not part of d: but ValidateUpdateListItem.

View solution in original post