Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以使用 JOLT SPEC 将值映射到键。我的输入Json
{ "name": "Rj", "Age" : "15" } Output Json as { "Rj" : { "Age":"15" } }
请为上述场景提供 Json SPEC
输入
{ "name": "Rj", "Age": "15" }
规格
[ { "operation": "shift", "spec": { // @(1,name) -> go up 2 level, come back down and // grab the value at "name" which is "RJ" // Thus this evaluates to // "Age" : "RJ.Age" "Age": "@(1,name).Age" } } ]