我有简单的JSON
{"ProductUID":1100,"Color":"White","tags":["toy","children","games"]}
我希望输出为
[ { "ProductUID": 1100, "Color":"White", "tags":"toy" }, { "ProductUID": 1100 "Color" : "White", "tags" : "Children" }, { "ProductUID": 1100, "Color": "White", "tags": "games" } ]
我曾在cosmos db中尝试过此查询,但无法分隔标签数组
SELECT P.ProductUID, P.tags
FROM Products P
join C in P.tags
答案 0 :(得分:0)
欢迎使用StackOverflow!
此查询应显示您的需求:
SELECT P.ProductUID, P.Color, C AS tags
FROM Products P
join C in P.tags