I would like to produce a list of all values from any given JSON. The special requirement is that for values in nested attributes, all the values of parent's attributes must be repeated in the line. No keys must be printed.
For example, from this input JSON:
{
"results":[
{
"id":306,
"name":"First Company",
"branches":[
{
"id":4191,
"city":"Seattle",
"customers":[
{
"id":446,
"name":"Big Tech 1"
},
{
"id":447,
"name":"Big Tech 2"
}
]
},
{
"id":4192,
"city":"Oakland",
"customers":[
{
"id":448,
"name":"Health Tech 1"
},
{
"id":449,
"name":"Health Tech 2"
}
]
}
]
}
]
}
I would like to produce this output (please notice the repeated values are highlighted in red, but the output should be with no colors; no keys should be printed):
The JSON above is just an example and generic JSON with arbitrary depth of nesting of JSON objects must be assumed, which suggests that the processing must be recursive. If null appears they must be printed as well.

Iterate and nest:
Demo
To keep the values JSON-encoded (quotes around strings), you could re-convert them using
@jsonDemo
Alternatively (to the JSON encoding), you could use the
@csvbuiltin, which also escapes strings but also separates the items with a comma:Demo