I have a array of objectID like this-
[
new ObjectId("62bab157e769a7dda09ec63f"),
new ObjectId("62bab15ce769a7dda09ec64a"),
new ObjectId("62bab164e769a7dda09ec657")
]
Now I need to get result like this-
[
'62bab157e769a7dda09ec63f',
'62bab15ce769a7dda09ec64a',
'62bab164e769a7dda09ec657'
]
I need the conversion function in one line just. Please help me.
ObjectID.toString()method.ObjectIdlook like?ObjectId...? You should at least properly tag the question then. And then: developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/…ObjectIdthe one from MongoDB? If so, this is a duplicate of this question. Please search thoroughly before posting. More about searching here.