【发布时间】:2017-03-16 17:26:22
【问题描述】:
是否可以使用 JOLT SPEC 将值映射到键。 我的输入 Json
{
"name": "Rj",
"Age" : "15"
}
Output Json as
{
"Rj" : {
"Age":"15"
}
}
请提供上述场景的 Json SPEC
【问题讨论】:
是否可以使用 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"
}
}
]
【讨论】: