谁能帮我一个JOLT 规范,将我的矩阵类型 json 转换为非规范化 json。请在下面找到我的输入 json 和我预期的 josn 输出。
输入Json:
[
{
"attributes": [
{
"name": "brand",
"value": "Patriot Lighting"
},
{
"name": "color",
"value": "Chrome"
},
{
"name": "price",
"value": "49.97 USD"
}
]
},
{
"attributes": [
{
"name": "brand",
"value": "Masterforce"
},
{
"name": "color",
"value": "Green"
},
{
"name": "price",
"value": "99.0 USD"
}
]
}
]
预期的 Json 输出:
[
{
"brand": "Patriot Lighting",
"color": "Chrome",
"price": "49.97 USD"
},
{
"brand": "Masterforce",
"color": "Green",
"price": "99.0 USD"
}
]
我试图构建 JOLT 规范来转换这个 json。但挑战是我有多个带有“属性”标签的表的 json。
提前致谢!