How to parse data from Zoho Analytics API

Zoho Analytics returns tabular datasets in the form of JSONs where column names are provided separately in an array, and table values are stored in a jagged array (array of arrays). Here is an example:

            [ "0", "10","XXX"],
            [ "1", "20","YYY" ],

Parsing such a structure may look challenging, however it’s doable with EasyMorph.

The idea is to make data suitable for pivoting, then pivot it. Column labels are pivoted separately to produce a table with the correct order of columns to which the main dataset is later appended.

With this approach it is possible to produce a tabular dataset from JSON without hardcoding column names or JSON paths.

See example below:
parse-json-zoho-analytics.morph (7.1 KB)
json.txt (262 Bytes)