Hello all, thank you for the great resource that this forum is.
I am looking for some assistance in looking up variables.
For example, if I have an "Array1" that returns:
[
{"id":1,"name":"abc,"label_ids":1},
{"id":2,"name":"def","label_ids":2},
{"id":3,"name":"ghi","label_ids":3}
]
I can save these into something like global.lookup
Now if I have another Array2 from a different endpoint that returns:
{"id"1234,"label_ids":[1,2,3]}
How do I look up the name on the Array2 from the global.lookup
Ideally I would like to convert all the label_ids to each contain and array with "id" and "name"
At the minimum I would like replace the "label_ids" in Array2 with "name" from Array1 for the entire array.
I could do it with If statements, but it is really messy especially if new labels get added.
Thank you very much for your assistance.