0
我想使用Jolt將JSON對象向下移動一個級別。這裏是我的輸入數據:使用Jolt重新保留JSON對象
{
"rating": {
"primary": {
"value": 3,
"max": 5
},
"quality": {
"value": 3,
"max": 7
}
}
}
我用下面的spec文件:
[
{
"operation": "shift",
"spec": {
"$": "NEWPARENT"
}
}
]
我目前正在生產輸出:
{
"NEWPARENT" : "root"
}
然而,我的目標是產生:
{
"NEWPARENT": {
"rating": {
"primary": {
"value": 3,
"max": 5
},
"quality": {
"value": 3,
"max": 7
}
}
}
}
Can任何人都可以幫助我創建適當的spec文件?
我已經通過http://jolt-demo.appspot.com/測試過了,它按照承諾工作。謝謝,米洛! – blong