我尝试使用Jolt将下面的输入转换为预期的输出
下面是我的输入:
[
[
"station_name",
"station_longname"
],
[
"10 Mile Brook Dam Water Level Daily Value, South W",
"10 Mile Brook Dam Water Level Daily Value, South West Region"
]
]
我试着把它转换成这个输出-
{
"station_name": "10 Mile Brook Dam Water Level Daily Value, South W",
"station_longname": "10 Mile Brook Dam Water Level Daily Value, South West Region"
}
我试着用这个Jolt -
[
{
"operation": "shift",
"spec": {
"*": {
"*": {
"@": "[&1]"
}
}
}
}
]
但结果是这样的-
[
[
"station_name",
"10 Mile Brook Dam Water Level Daily Value, South W"
],
[
"station_longname",
"10 Mile Brook Dam Water Level Daily Value, South West Region"
]
]
1条答案
按热度按时间hc2pp10m1#
您可以使用以下shift转换规范,例如
网站http://jolt-demo.appspot.com/上的***演示***是