How can i remove a candid from the below array collection.
{
"_id" : ObjectId("58978989"),
"positionId" : "54535343",
"jobTitle" : "Developer",
"status" : "Open",
"jobDescription" : "HyperLink Place holder",
"candidate" : [
{
"candid" : ObjectId("b20474567892345678900021")
},
{
"candid" : ObjectId("b30474567892345678900021")
},
{
"candid" : ObjectId("b40474567892345678900021")
},
{
"candid" : ObjectId("b50474567892345678900021")
}
]
}
expected output is
{
"_id" : ObjectId("58978989"),
"positionId" : "54535343",
"jobTitle" : "Developer",
"status" : "Open",
"jobDescription" : "HyperLink Place holder",
"candidate" : [
{
"candid" : ObjectId("b20474567892345678900021")
},
{
"candid" : ObjectId("b30474567892345678900021")
},
{
"candid" : ObjectId("b40474567892345678900021")
}
]
}