Hi,
I have an HTTP action that returns a maximum of 400 results per call. In order to collect all available items I'm storing each call's results in an array variable.
For example, the total results count is 423. This means I have to execute the HTTP action twice to get all items. However, if I check with the length() expression it will show an array length of 2. the first array contains 400 JSON objects and the second one the remaining 23.
My problem is that I'm unable to work with all 423. I've tried "Apply to each", "Select", "Parse JSON" but none gives me individual JSON objects to work with.
Here's the JSON schema, imagine that I have 423 times of what that is included in "value":
{
"type": "object",
"properties": {
"odata.metadata": {
"type": "string"
},
"value": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Identity": {
"type": "string"
},
"AuditData": {
"type": "string"
},
"CreationDate": {
"type": "string"
},
"IsValid": {
"type": "boolean"
},
"ObjectState": {
"type": "string"
},
"Operations": {
"type": "string"
},
"RecordType": {
"type": "string"
},
"ResultCount": {
"type": "integer"
},
"ResultIndex": {
"type": "integer"
},
"UserIds": {
"type": "string"
},
"ObjectIds": {},
"IPAddresses": {},
"SiteIds": {}
},
"required": [
"Identity",
"AuditData",
"CreationDate",
"IsValid",
"ObjectState",
"Operations",
"RecordType",
"ResultCount",
"ResultIndex",
"UserIds",
"ObjectIds",
"IPAddresses",
"SiteIds"
]
}
},
"odata.nextLink": {
"type": "string"
}
}
}So, "Apply to each" only applies to the two arrays - not getting the individual JSON objects.
"Select" doesn't work because it's not compatible with the array where the results are stored in.
Using "Parse JSON" again also doesn't give me individual JSON objects to work with.
Any idea how I can access them?
Perhaps it's not smart to collect the HTTP action results in an array variable or they have to be filtered beforehand, i.e. narrowed down to the individual "value" JSON objects?
Thanks for your help.