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