使用Stream Analytics查询创建JSON对象

时间:2017-04-19 11:02:37

标签: json azure azure-stream-analytics stream-analytics

我正在尝试将传入的JSON对象格式化为输出

作为JSON对象

输入:

{
  "id" : "001",
  "firstArray":[
    {
      "tid" : 9,
       "secondArray":[
         {
            "keep1" : "value1",
            "keep2" : "value2",
            "remove1" : "somevalue1",
            "remove2" : "somevalue2"
         },
         {...}
       ]
     },
     {
      "tid" : 8,
       "secondArray":[
         {
            "keep1" : "value1",
            "keep2" : "value2",
            "remove1" : "somevalue1",
            "remove2" : "somevalue2"
         },
         {...}
       ]
     }
  ]
}

我想过滤这个对象(删除一些无用的属性)并且有这样的东西。

输出:

{
  "id" : "001",
  "firstArray":[
    {
      "tid" : 9,
       "secondArray":[
         {
            "keep1" : "value1",
            "keep2" : "value2"
         },
         {...}
       ]
     },
     {
      "tid" : 8,
       "secondArray":[
         {
            "keep1" : "value1",
            "keep2" : "value2"
         },
         {...}
       ]
     }
  ]
}

有人可以帮我查询或指出正确的方向。 感谢

1 个答案:

答案 0 :(得分:0)