Hi.
I am a beginner user and I have encountered the following problem. I have a block that returns 4 different values and each of them is an array.
And my goal is to iterate thought this but i can’t. My idea is to first create proper JSON in format as in the example below
[
{
“id”: “123”
“name”: “event 1”,
“date”: “2023/01/10”,
“calendar_id”: “33”
},
{
“id”: “321”
“name”: “event 2”,
“date”: “2023/01/11”,
“calendar_id”: “12”
},
]
If each of these arrays has just one element, and that’s what your interested in, for example
id: [123]
name: [John]
Then what you can do is use a parse Json Module and inside your module structure it like this:
{
“id”: get(id;1)
“name”: get(name;1)
}
Here your just assigning id, name… and so on, to the first element in the array, note that in this IML Get() function, that array should be mapped from the arrays in your screenshot.
Hi. Thank you for the answer.
The issue is that I don’t know how many elements I will have. This means that it may be 0 or may be 4 so i have to somehow dynamically assign this this.