How to dynamically set an object value in array?

I have a page variable named imageList type is List and list type is Object, so it would be like *

imageList = [{id : 1 ; path : } ; {id : 1 ; path : }]

Here, ID is fixed. For path value I want to use the value from the Cache File Path. I can’t find any possible solutions. I tried Formula function but no luck. Any help is appreciated. Thank you :innocent:

Hello after reading the docs, I got the solution for this - It was simple, used this code in formula SET_ITEM_AT(pageVars.imageList, 0,SET_KEY(item,“path”,outputs[“Cache file”].file.path)) here id is reduntant and can be removed from the variable. Just replace the 0 to 1 for next item in your array.

1 Like