Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on
03-09-2021
02:01 AM
- last edited on
04-21-2026
02:06 AM
by
GrazittiAPI
Can anyone please help me a JOLT spec to convert my matrix type json to denormalized json. Please find the below my input json and my expected josn output.
Input 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"
}
]
}
]Expected Json output:
[
{
"brand": "Patriot Lighting",
"color": "Chrome",
"price": "49.97 USD"
},
{
"brand": "Masterforce",
"color": "Green",
"price": "99.0 USD"
}
]I was trying to build JOLT spec to convert this json. But challenge is the json which I have multiple tables with "attributes" tag.
Thanks in advance!
Created 03-09-2021 02:28 AM
[
{
"operation": "shift",
"spec": {
"*": {
"attributes": {
"*": {
"@(0,value)": "attributes[#4].@(0,name)"
}
}
}
}
}
]
Created 03-09-2021 02:28 AM
[
{
"operation": "shift",
"spec": {
"*": {
"attributes": {
"*": {
"@(0,value)": "attributes[#4].@(0,name)"
}
}
}
}
}
]
Created on 03-09-2021 03:13 AM - edited 03-09-2021 03:14 AM
@NIFIJOLT This is working as I expected. Thank you so much!!!