-1
I would like to know how to convert the object:
[ { company: ["5dc317a826bc467c9ca8054e", "5e53f7d32b422507c4dcb11d" ] } ]
for ["5dc317a826bc467c9ca8054e", "5e53f7d32b422507c4dcb11d"]
in Node.js.
-1
I would like to know how to convert the object:
[ { company: ["5dc317a826bc467c9ca8054e", "5e53f7d32b422507c4dcb11d" ] } ]
for ["5dc317a826bc467c9ca8054e", "5e53f7d32b422507c4dcb11d"]
in Node.js.
2
It is not possible to "convert" this object the way you think, but it is possible to get the result you want by getting the attribute value company
thus:
const objeto = [{company: ["5dc317a826bc467c9ca8054e", "5e53f7d32b422507c4dcb11d"]}];
const array = objeto[0].company;
console.log(array);
Thanks a lot, thanks a lot!
Browser other questions tagged javascript
You are not signed in. Login or sign up in order to post.
Could you add more details to the question?
– Boneco Sinforoso