Suppose I have some documents like this:
{
"date": 20161205,
"session": 3,
"events": {
"e1": {
"count": 1
},
"e2": {
"count": 2,
}
}
}
{
"date": 20161206,
"session": 2,
"events": {
"e1": {
"count": 1
}
}
}
How to use N1QL to aggregate all docs and merge events
object to get this result?
{
"session": 5,
"events": {
"e1": {
"count": 2
},
"e2": {
"count": 2,
}
}
}
Thanks for any help!