Show amount greater than 10000, where amount data type is string in MongoDB
db.transaction.aggregate( [ { "$match": {"AMOUNT":{"$ne":null}} }, { "$group": {"_id":{}} }, { "$addFields": {AMOUNT:{$toDouble:["$AMOUNT"]}} }, { "$project": {"AMOUNT":{"$gt": 10000}} } ] ); Trying to fetch amount from the collection which is greater than 10000, as I'm working in MongoDB so data…