[英]Not able to Convert Array of Json to Flattern Json Using Jolt (V0.1.1)
Input payload:输入有效载荷:
{
"accountNo":112233,
"type":"DEDICATED",
"Plans" : {
"One":"Basic",
"Two":"Mid",
"Three":"Premium"
},
"Address": {
"Primary":{
"Addressline1":" road 1, boss lane",
"AddressLine2": "ST",
"City":"Tex"
}
}
}
Expected PayLoad:预期有效载荷:
{
"accountNo":112233,
"type":"DEDICATED",
"One":"Basic",
"Two":"Mid",
"Three":"Premium",
"Addressline1":" road 1, boss lane",
"AddressLine2": "ST",
"City":"Tex"
}
Used Jolt v0.1.1 not able to convert, could anyone help me out使用 Jolt v0.1.1 无法转换,谁能帮帮我
Check this spec,检查这个规格,
[
{
"operation": "shift",
"spec": {
"accountNo": "accountNo",
"type": "type",
"Plans": {
"One": "One",
"Two": "Two",
"Three": "Three"
},
"Address": {
"Primary": {
"Addressline1": "Addressline1",
"AddressLine2": "AddressLine2",
"City": "City"
}
}
}
}
]
You can individually evaluate the expression by seperating into the conditional branches of Plans
, Address.Primary
and *
for the rest( non-nested ) of the elements within a shift transformation such as您可以通过分离到
Plans
、 Address.Primary
和*
的条件分支来单独评估表达式,以用于移位转换中的其余(非嵌套)元素,例如
[
{
"operation": "shift",
"spec": {
"Plans": {
"*": "&"
},
"Address": {
"Primary": {
"*": "&"
}
},
"*": {
"@": "&"
}
}
}
]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.