我刚开始使用JOLT
我有此输入JSON
[
{
"agent-submit-time": -1,
"agent-end-time": 123445,
"agent-name": "Marie Bayer-Smith"
},
{
"agent-submit-time": -1,
"agent-end-time": 123445,
"agent-name": "Marie Bayer-Smith"
}
]
这是我拥有的JOLT规范
[
{
"operation": "shift",
"spec": {
"*": {
"*-*-*": "&(0,1)_&(0,2)_&(0,3)",
"*-*": "&(0,1)_&(0,2)",
"*": "[&]"
}
}
}
]
它给了我输出
{
"agent_submit-time" : [ -1, -1 ],
"agent_end-time" : [ 123445, 123445 ],
"agent_name" : [ "Marie Bayer-Smith", "Marie Bayer-Smith" ]
}
但我想要
[
{
"agent_submit_time" : -1,
"agent_end_time" : 123445,
"agent_name" : "Marie Bayer-Smith"
},
{
"agent_submit_time" : -1,
"agent_end_time" : 123445,
"agent_name" : "Marie Bayer-Smith"
}
]
任何人都可以解释规范有什么问题以及如何解决吗? 谢谢