Database

[{"firstValue":6,"secondValue":3},{"firstValue":6,"secondValue":5},{"firstValue":6,"secondValue":7}]

Query

db.collection.find({"$expr":{$gt:[{"$subtract":["$firstValue","$secondValue"]},2]}})

Result