MongoDB Znajdź dokumenty, w których dwa pola są równe
db.myCollection.find( { $where: "this.a1.a != this.a2.a" } )
Bored Bison
db.myCollection.find( { $where: "this.a1.a != this.a2.a" } )