【发布时间】:2018-08-31 12:05:57
【问题描述】:
我从 Jolt 开始,但我无法将数组的元素连接到单个字符串,
我有这样的json:
{
"partNb": "1234",
"partDescriptions": [
{
"country": "GB",
"language": "en",
"content": "1 tool description in en_GB"
},
{
"country": "GB",
"language": "en",
"content": "2 tool description in en_GB"
}
]
}
并带有颠簸规范:
[
{
"operation": "shift",
"spec": {
"partNb": "id",
"partDescriptions": {
"*": {
"content": "description"
}
}
}
}
]
为此,我有这个输出:
{
"id" : "1234",
"description" : [ "1 tool description in en_GB", "2 tool description in en_GB" ]
}
但是如何得到这样的结果呢?:
{
"id" : "1234",
"description" : "1 tool description in en_GB , 2 tool description in en_GB"
}
【问题讨论】: