我的输入 JSON
{
"title": [
"vsnu",
"anothervsnu"
]
}
我的规格
[
{
"operation": "shift",
"spec": {
"title": {
"*": {
"$(1)": "Responses[].head",
"@": "Responses[].name"
}
}
}
}
]
我的输出:
{
"Responses" : [ {
"head" : "title"
}, {
"name" : "vsnu"
}, {
"head" : "title"
}, {
"name" : "anothervsnu"
} ]
}
预期输出:
{
"Responses" : [ {
"head" : "title",
"name" : "vsnu"
}, {
"head" : "title",
"name" : "anothervsnu"
} ]
}
请帮助我为上述预期输出编写正确的 JOLT 规范。迭代时我无法填充“标题”。