I had JSON that contain JSON string . I want to replace JSON string to ObjectId
{
"_id" : "5fd484c39590020dc0dfb82a",
"eventId" : "5fd210952f4961e258437c9f"
}
I want to get the ObjectId like so,
{
"_id" : ObjectId("5fd484c39590020dc0dfb82a"),
"eventId" : ObjectId("5fd210952f4961e258437c9f")
}
db.collection('members').find().toArray({
"_id" : ObjectId("5fd484c39590020dc0dfb82a"),
"eventId" : ObjectId("5fd210952f4961e258437c9f")
})
Is possible to convert the JSON string to ObjectId