how can I do to return an array with the positionId property of each of the positions [duplicate]

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

https://prnt.sc/tejeFHCZw2I3

my object:

const test = [
  {
    0: {
      colPos: 0,
      value: "valueX1",
      positionId: 2,
    },
  },
  {
    0: {
      colPos: 0,
      value: "valueY0",
      positionId: 3,
    },
  },
];