Help with generating my first JSON

Hi,
I have to generate my first json for another system and I'm stuck with the implementation - maybe one of you can help me out. :slight_smile:

the sample data is like this:
sample-data.xlsx (8.9 KB)
sample-data2.xlsx (9.0 KB)

and the output should be like this:
(the featureNames are not fixed - other products can have other or also none features)

[
  {
    "parentId": "p70451",
    "parentName": "Kappe 55-62 cm ELYSEE",
    "childId": 199336,
    "childName": "Kappe Roman 53-61cm orange ELYSEE",
    "attributes": {
      "Farbe": "orange",
      "Größe": "55-62 cm",
      "Material": "80% Polyester / 20% Baumwolle"
    }
  },
  {
    "parentId": "p70451",
    "parentName": "Kappe 55-62 cm ELYSEE",
    "childId": 199337,
    "childName": "Kappe Daniel 53-61cm gelb ELYSEE",
    "attributes": {
      "Farbe": "gelb",
      "Größe": "55-62 cm",
      "Material": "80% Polyester / 20% Baumwolle"
    }
  }
]

I have tried many things - my best result was, that in the attribute section I have something like that.

    "attributes": {
      "featureName": "Farbe",
      "featureValue": "orange",
      "featureName": "Größe",
      "featureValue": "55-62 cm"
    }

and that is not what I need.

I hofe someone can help me - thanks in advance!

best wishes
Peter

I would do it like this:
json.morph (5.6 KB)

Best regards,

Jochen

1 Like

Thank you so much @Jochen_Marquardt
the pivot of the features was the missing brick in my thoughts - you made my day!

have a great day!
Peter

1 Like