Hi.
I am currently trying to use MongoDB for VS Code to run CRUD commands that I would usually run in Robo 3T but they are not working - example script that works as intended in Robo 3T:
> var email = '<user email>';
> var user = db.getCollection('<collection name 1>').find({email: email});
>
> db.getCollection('<collection name 1>').deleteMany({platformUserId: user[0]._id})
> db.getCollection('<collection name 2>').deleteMany({email: email})
> db.getCollection('<collection name 3>').deleteMany({email: email})
When I try to run this in a playground I get the error ‘Cannot read property ‘_id’ of undefined’
Any ideas?
Thanks,
Liam