Flux - Experimental json.parse()

Hi,

I’m experimenting with the json.parse function but I’m blocked. From the help:

The json.parse() function takes JSON data as bytes and returns a value. The function can return lists, records, strings, booleans, and float values.

The example is quite simple and its lacking details on the “lists, records” part I’m interested in.

I would like to test a more complexe scenario:
I’m loading a json file (from couchdb). I’m doing it using the experimental http.get function.
I would like to parse it into a stream of tables
Then I will for exemple join it with data I have in influxDB

my json look likes:
{
“_id”: “masterSamples”,
“_rev”: “3-0d9d8777759e681c780688a6051a41e9”,
“masterSamples”: [
{
“ProductCode”: “PS000607”,
“FaultCode”: 8530,
“FaultDesc”: “default 8530”
},
{
“ProductCode”: “PS000807”,
“FaultCode”: 7330,
“FaultDesc”: “default 7330”
},
{
“ProductCode”: “PS000307”,
“FaultCode”: 7130,
“FaultDesc”: “default 7130”
}
]
}

I would like to parse it into a table having a column ProductCode, FaultCode, FaultDesc.

Is it achievable in flux ?

Thanks,

Benoît