Is it possible to create elements dynamically, from an array returned from a service call?
For example: Given the following array, I want to create two sections with an undetermined number of grid rows.
[
{
"fields": [
{
"field_name": "Sample Field",
"field_value": "123456"
},
{
"field_name": "Sample Field 2",
"field_value": "123"
}
],
"section_name": "Section As"
},
{
"fields": [
{
"field_name": "Sample Field",
"field_value": "123456"
},
{
"field_name": "Sample Field 2",
"field_value": "123"
}
],
"section_name": "Section B"
}
]
I've added a single collapsible section to the page, inside the section content is a grid with a single row and two columns. (grid is used for formatting). Inside the first grid cell is a label to hold the field_name, and inside the second grid cell is a label to hold the field_value. This would ideally create 2 collapsible blocks, with two rows in each.
This may not be possible with the current Builder Interface, but wanted to check as it would reduce development time significantly on my end. I tried mapping the output to each element but could not seem to get this to work.
Thanks!