shape-json icon indicating copy to clipboard operation
shape-json copied to clipboard

How to parse this nested json object?

Open johnstontrav opened this issue 5 years ago • 0 comments

Hi,

Firstly, great little project.

Given this input:

let nestedInput = [{ "id": "2", "color": "blue", "people": [ { "name": "carl", "age": "22" }, { "name": "bob", "age": "32" }, ] }];

How would the schema look in order to get this output:

[ { "color": "blue", "name": "carl", "age": "22" }, { "color": "blue", "name": "bob", "age": "32" } ]

Cheers, Trav.

johnstontrav avatar Oct 07 '20 01:10 johnstontrav