Is there a jmespath expression that will convert this:
{ "a": 5
, "b": [ {"c":6}, {"c":7}, {"c":8}]
}
into this:
[ {"a":5, "c":6}
, {"a":5, "c":7}
, {"a":5, "c":8}
]
Many thanks in advance!
Is there a jmespath expression that will convert this:
{ "a": 5
, "b": [ {"c":6}, {"c":7}, {"c":8}]
}
into this:
[ {"a":5, "c":6}
, {"a":5, "c":7}
, {"a":5, "c":8}
]
Many thanks in advance!
Given the following dataset ...
{ "a": 5
, "b": [ {"c":6}, {"c":7}, {"c":8}]
}
... the following jmespath query ...
[
@.{"a":"a","c":"b"[0].c}
, @.{"a":"a","c":"b"[1].c}
, @.{"a":"a","c":"b"[2].c}
]
... produces the following result
[
{"a":5, "c":6}
, {"a":5, "c":7}
, {"a":5, "c":8}
]