is this doable with JMESPath?
i want to transform this
{
"common": "value",
"subdicts": {
"first": {"sub" : 10},
"second": { "sub": 20}
}
}
to
[
{"common": "value", "sub": 10},
{"common": "value", "sub": 20}
]
is this doable with JMESPath?
i want to transform this
{
"common": "value",
"subdicts": {
"first": {"sub" : 10},
"second": { "sub": 20}
}
}
to
[
{"common": "value", "sub": 10},
{"common": "value", "sub": 20}
]
You can use it.
[
{
Common:common,
Sub:subdicts.first.sub
},
{
Common:common,
Sub:subdicts.second.sub
}
]
Result
[
{
"Common": "value",
"Sub": 10
},
{
"Common": "value",
"Sub": 20
}
]