Syntax Error in Compass for db.["collection"].deleteMany({})

Using Compass 1.31.2 on Mac, my previously working commands for the shell has stopped working with a SyntaxError. Any ideas?

use sap-event-mesh
db.["em-mongo-aci-loader-3"].deleteMany({})

Hi @Mikael_Gurenius, can you try again with following command:

db["em-mongo-aci-loader-3"].deleteMany({})

I just removed an extra period.

Oh gosh. A little embarrassed here. Thought I tried all possible combinations, especially that one!

Thanks!

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.