'Cosmos db - how to combine different results values in one result's particular attributes

I don't how can I explain this question, but suppose I have cosmos db container which look like this

Query -

select c.Name,c.Value from c where c.Name = "abc"

Result -

[
  {
    "Name":"abc",
    "Value":{"a":5,"b":6}
  },
  {
    "Name":"abc",
    "Value":{"a":1,"b":2}
  }
]

Now I wanted to combine these value as array in singal results like this

 {
    "Name":"abc",
    "Values":[
         {"a":5,"b":6},. 
         {"a":1,"b":2}
    ]
 }

What SQL query should I run



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source