0

I have a Json array.

[
    {
        "id": 1,
        "data1": "A",
        "data2": "B",
    },
    {
        "id": 2,
        "data1": "C",
        "data2": "D",
    }
]

I want to extract only the values and remove the ID key then add every object to new nested array like this;

[
    [
        "A",
        "B"
    ],
    [
        "C",
        "D"
    ]
]

I tried Object.entries but this way cannot get rid of the keys.

How can I extract only the values without ID key and create new array?

I will use this in filefy.

ilvthsgm
  • 586
  • 1
  • 8
  • 26

0 Answers0