I have a requirement to load API data into cosmos db . So need to loop all the api pages for given period and load in cosmos db.
my pipeline has a web activity to get the api response first . then passing the page_count to foreach activity to loop through.
When there is data in API response the output looks below .
When API doesnt have data the output looks below.
I have written below condition in foreach activity for looping . Since the web activity output not same in both conditions , the below code not working .any suggestion please.
@range(1,if(contains(activity('WEB_GET_NUMBEROFPAGES').output.Response,'No data found'),1,activity('WEB_GET_NUMBEROFPAGES').output.ameta.page_count))