JSON_Get (JSON_object, id [, id, ... ])

Result type:  text, number, or JSON object handle depending on JSON object contents

Definition:  Extracts data or a sub-object from a JSON object obtained from JSON_Parse() or JSON_Get(). The extracted data is identified by the sequence of id identifiers, which will be textual id names, o, if the JSON structure being accessed is an array, a numeric index.

It is assumed that you know the structure of the JSON data in advance. One unknown may be the size of arrays in the object. When accessing an array by index, if the index is out of range, the return value will be NULL, thus you can iterate with an increasing index until you get a NULL result.

See Also:


JSON_Free: Free a parsed JSON structure

ParamsFromArray: Expand array values to a variable parameter list