LiveCode DataGrid assistance requested

Brian K. Duck bduck at
Tue May 4 11:26:10 EDT 2021

Hello listers...

I’m working on an app that pulls data from a API which returns JSON and is converted to an array then displayed in a DataGrid.

The data returned is complex JSON, there are a few rows that are name value pairs, but most of the highest level rows are arrays, and there are those that are arrays of arrays (of arrays).

After adding  “Combine array using return,” I can display it as text in a field, but I only get the rows that aren’t array data on their own. So, most of the data is lost.

There are challenges, so I have questions….
How best to convert nested arrays to text for displaying the data within a field?

And, I’d like to display certain values from the DataGrid in a text field, like the name attribute, a URL…. The data may be in a different position, for different results, but the structures are consistant. Some data are attributes of a key value, some are the key values.
What is the best way to traverse the data to find specific values?

Also, should I be looking at the datagrid, array, or JSON for the source of these fields?

The current goal is an MVP where I’m displaying data, but the larger goal is building an editor to start with the minimal data and allow editing, publising as files, and further down the road submission to and API service for posting. So, guidance on the design with evolution in mind is much appreciated.

Also, there is a need to count elements in the array of arrays. The examples I see are oversimplified and don’t sow any details on finding data in array within an array.

Is there an example, or reference, that I missed?

Also, how can I tell if I’m working with a DataGrid or instance of DataGrid 2?

Thanks for your bandwidth,


More information about the use-livecode mailing list