Re-organizing the JSON output to a "Simple" format

Hey @Jorge_M
this line will do the trick:

const newObjects = Object.entries(item.json).map(([key, value]) => ({
  Type: key,
  ...value
}));

It parses all keys of a json-object to a list of objects.

This is the full workflow:

For this kind of questions ChatGPT is really handy. Even the free GPT3.5 model can handle that kind of strutured questions really well.

Cheers.

3 Likes