Multidimensional array issue

Jim Lambert jiml at netrin.com
Wed Mar 10 15:38:00 EST 2021


This is a very interesting discussion of LC arrays. But back to the original post:

> HENRY LOWE wrote:
> 
> I am using multidimensional arrays to process data read from JSON files.
> Some of the data in the JSON files can be represented in alternative forms in files from different sources.
> For example a field named ?status? may be represented as either:

> "status": {
>    "text":"active"}
> 
> or
> "status": {"active"}
> 
> To recognize both forms I use code (after transforming JSON to an array tArray] 

Perhaps massage the JSON before importing it into an array.

           replace quote & "text" & quote & ":" with empty in myJSON

In this way there won't need to distinguish "alternate forms" in the LC array.

Jim Lambert


More information about the use-livecode mailing list