{
"_id" : ObjectId("5d3acf79ea99ef80dca9bcca"),
"memberId" : "123",
"generatedId" : "00000d2f-9922-457a-be23-731f5fefeb14",
"memberType" : "premium"
},
{
"_id" : ObjectId("5e01554cea99eff7f98d7eed"),
"memberId" : "123",
"generatedId" : "34jkd2092sdlk02kl23kl2309k2309kr",
"memberType" : "premium"
}
I possess a dataset consisting of 1 million documents in this particular format, and I am seeking guidance on how to eliminate duplicate documents based on the "memberId" field. Specifically, my goal is to delete duplicated documents where the value of "generatedId" does not contain a hyphen ("-"). As per the provided example, the second document should be removed due to the absence of a hyphen in the "generatedId" value. I would greatly appreciate any suggestions or insights on how to achieve this task.