how can I return an array of “`positionId, so that I get the
positionId“ of each of the positions.
that is, the expected return looks something like this:[2, 3]
, which is the “`positionId“ of each of the positions.
I tried doing it with forEach, but to no avail.
the object is in the following image
my object:
const test = [
{
0: {
colPos: 0,
value: "valueX1",
positionId: 2,
},
},
{
0: {
colPos: 0,
value: "valueY0",
positionId: 3,
},
},
];