使用jsonpath从json获取唯一值

时间:2019-06-05 13:57:42

标签: arrays json jira jsonpath

我正在使用NFeed(elements Connect-Jira Addon元素)从api读取json响应,我想列出唯一值并提供正确的json路径。

说明: 我的json响应如下:

{
  "Describe": {
    "Device": [
      {
        "PoP": "POP01",
        "Type": "cgn",
        "Description": "Hello",
        "DataStatus": "COMPLETED",
        "Name": "cgn02.xyz"
      },
      {
        "PoP": "NYC02",
        "Type": "br",
        "Description": "Hello",
        "DataStatus": "COMPLETED",
        "Name": "br01.xyz"
      },
      {
        "PoP": "POP01",
        "Type": "var",
        "Description": "Hello",
        "DataStatus": "COMPLETED",
        "Name": "var02.xyz"
      }
    ]
  }
}

配置nFeed字段:

enter image description here

输出:

pop (Key)
POP01
NYC02
POP01

JSON路径:$ .Describe.Device.PoP 这为我列出了所有流行名称,但我想使用json路径仅获取唯一的流行名称。有没有人可以帮忙?谢谢

0 个答案:

没有答案