Hi,
I have a json like this:
{
"topLevel": "1",
"childArray": [
{
"a2": "o",
"inner": [
{
"innera1": "innerv1",
"innerb1": "innerb1"
}
]
},
{
"a2": "au",
"inner": [
{
"innera1": "innerv1-v2",
"innerb1": "innerb1-v2"
},
{
"innera1": "innerv1-v3",
"innerb1": "innerb1-v3"
}
]
}
]
}
I want the n1ql to merge and fetch all values in childArray having a2, and innera1
The response should look like this
{
"topLevel": "1",
"childArray": [
{
"a2": "o",
"innera1": "innerv1"
},
{
"a2": "au",
"innera1": "innerv1-v2"
},
{
"a2": "au",
"innera1": "innerv1-v3"
}
]
}
Any suggestion to achieve this ?