REST API getting Nested Arrays

I have tables in my backend with nested arrays. How do I GET the lower level arrays using appgyver?

e.g.
table with name, id, ARRAY
ARRAY has image URL, size

I want to pull out the URL so I can display the URL in a list on the app UI.

Hi there,

this should work quite well with AppGyver. Have you already setup the Data API in AppGyver and have some example data in your database? If yes, in AppGyver you can navigate to your Data Api and then select the GET function. Within the GET function select the tab “Test” and then hit “Run test”. If everything is configured correctly you will get the example data from your api. And now the good part comes. Hit “Set schema from response” and Appgyver will automatically create the correct datatypes for your data. This should also work for your nested array.

Hope that helps.

Thanks, my question wasn’t clear.

I need to be able to display data from the nested array in a list in appgyver. However, because it’s one level down, appgyver sees it as an object with multiple properties and so is ‘incompatible’, (list of objects with 3 properties) when I try and select it as e.g. image URL in list.

Here’s an example:

In my table I have some fields, say Name, Date, Attachment. The attachment field contains an array with: URL for thumbnail, size, filename.

I want to display a list in appgyver with Name, Date, URL.

I just need to know the syntax used to get that data out, e.g. TABLE1[TopKey3{SubKey1}]

I’m new to appgyver so perhaps there’s an easy way to get to it?

Ok, it’s very simple. Rather than trying to load from data variable, in composer I selected formula and went to “currently repeated data items” and set the URL using that formmula e.g. = “repeated.current.field_119204[0].thumbnails.small.url”

This is a lot easier to do using HTTP Request flow functions where you can specify more specifically the level of the data you want to GET.

But even if you get a complete JSON response then you should be able to use . dot notation to drill down to whatever data you’re looking for.