Mongodb – How to use substring for comparison in mongo db
Below is my aggregation db.customers.aggregate([{ $match: { "CDF.UTILITYTYPE.D1.G1" : "12387835" } }, { $project: { _id:0, "CDF.UTILITYTYPE.D1.G22.NAME":1, "CDF.UTILITYTYPE.D1.G1":1, "CDF.UTILITYTYPE.D5.EVENT": { $filter: { input: "$CDF.UTILITYTYPE.D5.EVENT", as: "item", cond: { $eq: [ "$$item.TIME", "12-04-2018 15:46:02" ] } } } } } ]).pretty();…