I have an example code below :
z = [] //To get all the Id
x = [
{
_id: "12345",
name: "A"
},
{
_id: "67890",
name: "B"
}
]
The question is how I can get all the "_id" from "x" and save it to "z". So the results like this:
z = ["12345", "67890"]
Any answer would be appreciated