is there some way to achieve the following behaviour in JMESPath?
I have a dict like this:
{
"foo": "aa",
"bars": [
"bb",
"cc"
]
}
I am looking for a result like the following. The scalar value "aa" should be combined with every item of the "bars" array to get an array of flat dicts. (The change from "bars" to "bar" would be nice but is not a must have, I look for the combination of the elements mainly.)
[
{
"foo": "aa",
"bar": "bb"
},
{
"foo": "aa",
"bar": "cc"
}
]
Would be great if someone knows a way to achieve this.