Reputation: 247
Wondering if you could help with this problem please. I am ingesting data from an API using Azure logic App. I have managed to set up everything else but struggling with pagination in Until condition.Logic App continues to ingest/consume data and creates blank json files with data[]. I have added the screenshots (with and without data in the page). When data is completed, empty or blank page looks like data[].
Any idea what could be my condition in "Until" ?
Upvotes: 1
Views: 957
Reputation: 15754
In your question I can't see the "Until" condition but just a "If" condition, but I think you just want to know how to check if the "data" field is empty and then do different actions (If I misunderstand your requirements, please provide more details and I will try to help you on it).
Please refer to the steps below:
1. We need to use a "Parse JSON" action to parse your json data, when click "Use sample payload to generate schema", you can put the json data which "data" field is not empty into it. And then it will generate the schema automatically.
2. Then we can use "length()" method in the "If" condition.
The whole expression of "length()" method above is:
Below provide the code for you to copy.
length(body('Parse_JSON')?['data'])
Hope it helps~
Upvotes: 2