想象我们有一个这样的集合(示例取自 https://www.documentdb.com/sql/demo)
{
"_id" : "19015",
"description" : "Snacks, granola bars, hard, plain",
"servings" : [
{
"amount" : 1,
"description" : "bar",
"weightInGrams" : 21
},
{
"amount" : 1,
"description" : "bar (1 oz)",
"weightInGrams" : 28
},
{
"amount" : 1,
"description" : "bar",
"weightInGrams" : 25
}
]
}
Run Code Online (Sandbox Code Playgroud)
我如何在SQL api中查询CosmosDB以获取这样的结果?
{
"_id" : "19015",
"servings" : [
{
"description" : "bar"
},
{
"description" : "bar (1 oz)"
},
{
"description" : "bar"
} …Run Code Online (Sandbox Code Playgroud)