Hi all,
I have an export from Sales Layer which I am trying to sanitize by combining key-value pairings. The Sales Layer gives us different arrays which contain the data-schemas and the products but does not combine them automatically. For example, this is what Sales Layer exports:
"data_schema": {
"products": [
"STATUS",
"ID",
"ID_categories",
"code",
"family",
"category",
"name",
"description_nl"
]
}
"data": {
"products": [
[
"M",
"305",
"535",
"107893",
[
"EC000038"
],
"IB-SUB167",
"DURA, 01982-ES 80w 118 mm",
"DURA, 01982-ES 80w 118 mm"
]
]
}
I am trying to combine these so the products get the correct key-value pairing. For example:
"data": {
"products": [
[
"STATUS": "M",
"ID": "305",
"ID_categories": "535",
"code": "107893",
"family": [
"EC000038"
],
"category": "IB-SUB167",
"name": "DURA, 01982-ES 80w 118 mm",
"description_nl": "DURA, 01982-ES 80w 118 mm"
]
]
}
Is there an easy way to do this?