I am extracting href from a link to get the url for pagination, i am storing an api response in blob as json. Using lookup activity i am reading the json and set a variable for next pagination url. The below logic is working fine when file has a pagination and url is in a link array. But when there is no pagination url present in a file then link is not an array and i am getting this error
expression cannot be evaluated because property 1 cannot be selected object. properties can only be selected by names
Logic
@if(
equals (activity('LookupActivity').output. firstRow[ 'feed']
['link '][1]['@rel'], 'next'),
activity('LookupActivity').output.firstRow['feed ']['link'][1]
'@href'],
‘’
)
Pagination-
enter image description here
No pagination
enter image description here
I am using this variable in until activity and iterating through other pages.