cosmos db中是否有任何方法可以返回标量对象而不是数组?
SELECT * FROM c where c.VesselId=40
返回:
[
{
"VesselId": 40,
"LatestReportId": null,
"Name": "xxx",
}
]
我想要:
{
"VesselId": 40,
"LatestReportId": null,
"Name": "xxx",
}
答案 0 :(得分:0)
尝试SELECT top 1 c FROM c where c.VesselId=40
或SELECT top 1 VALUE c FROM c where c.VesselId=40