Apologies for the basic question but this is driving me mad.
I have uploaded files via form, and have the following array which has the file details stored within it.
[
{
"name": "Filename1.jpg",
"link": "https://FILELINK",
"id": "abcde",
"type": null,
"size": 652825,
"referenceId": "abcde",
"driveId": "abcde",
"status": 1,
"uploadSessionUrl": null
},
{
"name": "Filename2.png",
"link": "https://FILELINK",
"id": "abcde",
"type": null,
"size": 20571,
"referenceId": "abcde",
"driveId": "abcde",
"status": 1,
"uploadSessionUrl": null
}
]
I need to loop through the array and access each 'link' in turn and append to a string variable so that I end up with "link1,link2,link3" etc
I have tried accessing via "items('Apply_to_each')?['link']" but it is erroring.
Current flow;
Initialise an array variable (var_array)
Append above array to var_array
Apply to each based on var_array as input
(within apply to each append to string variable (var_string) items('Apply_to_each')?['link'] <- falls over here
Im sure its a basic error
'The template language expression 'items('Apply_to_each')?['link']' cannot be evaluated because property 'link' cannot be selected. Property selection is not supported on values of type 'String'
my input to the apply to each is definitely an array variable, so I dont really understand the error.
thank you
Categories: