In my JSON record file, there is an element called "custitem_list" with the following structure:
"custitem_list": [
{
"internalid": "1",
"name": "FLAT AND DULL"
},
{
"internalid": "2",
"name": "FRIZZY"
}
]
My goal now is to extract the list names from this record and push them into another JSON record as option values in an attribute element. Here is the desired structure:
"attributes": [
{
"id": 0,
"name": "Custlist",
"position": 0,
"visible": true,
"variation": false,
"options": [
{
"FLAT AND DULL",
"FRIZZY"
}
]
}
]
I have attempted multiple methods to achieve this, but none of them are giving the expected results. Can someone provide me with some guidance on this matter?
Thank you very much.