我正在使用以下 EL
jsonPath($, "$array.map({id: value.get('id'), type: value.get('type') })")
产生下一个变量...
但是 key(id) 没有保持唯一?!
[{
"id": "1",
"type": "1"
},
{
"id": "1",
"type": "2"
},
{
"id": "2",
"type": "1"
}]
我可以在 snaplogic 表达式语言或 snap 中使用什么来获得以下唯一键数组:
[{
"id": "1",
"types": ["1", "2"],
{
"id": "2",
"type": ["1"]
}]
有任何想法吗?