Tuesday, 19 February 2019

mongo db query ( group , aggregate ) to fetch latest network backup




 db.backup.aggregate({$unwind: '$backupDoc'},{$match: { "backupDoc.status": "success" }},{$group: {"_id" : "$deviceIp",lastdate: {$max: "$backupDoc.datetime"}}

No comments:

Post a Comment

Git

1 git add ↳ It lets you add changes from the working directory into the staging area 2 git commit ↳ It lets you save a snapshot of currently...