I’m pressing a button that sends params to my external API and it returns values dynamically based on the parameters. ALL the fields in the return object are static, EXCEPT the amount of layers in the Layers field. On some API calls, I may receive 3 layers, on another one I may receive 9, etc. The structure of an example output from the API looks like.
{
. StaticValue1: 0,
. Layers: [
. . [Layer1, 0, 3],
. . [Layer2, 1, 4],
. . [Layer3, 4, 6],
. . …!!!
. ],
. StaticValue 2: 0,
}
I have so many questions right now and Bubble’s functionality seems so limited it’s driving me crazy. From what I understand, I can only statically set RG’s row’s and columns. I want to be able to pull this data from my external API and set an element to nicely display all the layer’s data accordingly:
--------------------------------------
| StaticValue 1: 0 |
--------------------------------------
| StaticValue 2: 0 |
--------------------------------------
| Layer1 | Val: 0 | Val: 3 |
--------------------------------------
| Layer2 | Val: 1 | Val: 4 |
--------------------------------------
| Layer3 | Val: 4 | Val: 6 |
--------------------------------------
I’ve already tried making a thing of things, using my entire API output data into a new thing typed
‘API-Object’ with the structure:
'API-Object'
StaticValue1: number,
StaticValue2: number,
LayerList: (don't even know how to transform API output into list
not to mention I have to somehow build a list of Layer-Object types)
I also have another thing type ‘Layer-Object’ meant to hold each layer object and it contains
'Layer-Object'
Val1: number,
Val2: number
This is the step I’m currently stuck on:
Can you tell me how I can create an RG element because I can’t for the life of me figure it out.