Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Azure cosmosdb 需要在azure cosmos db中展平json数组_Azure Cosmosdb - Fatal编程技术网

Azure cosmosdb 需要在azure cosmos db中展平json数组

Azure cosmosdb 需要在azure cosmos db中展平json数组,azure-cosmosdb,Azure Cosmosdb,我有简单的JSON {"ProductUID":1100,"Color":"White","tags":["toy","children","games"]} 我希望输出为 [ { "ProductUID": 1100, "Color":"White", "tags":"toy" }, { "ProductUID": 1100 "Color" : "White", "ta

我有简单的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" } ]
欢迎来到StackOverflow

此查询应投影您需要的内容:

SELECT  P.ProductUID, P.Color, C AS tags
FROM Products P
join C in P.tags
SELECT  P.ProductUID, P.Color, C AS tags
FROM Products P
join C in P.tags