Skip to content

Instantly share code, notes, and snippets.

@pgbytes
Last active August 29, 2015 14:05
Show Gist options
  • Save pgbytes/8bed262683efb66ce58f to your computer and use it in GitHub Desktop.
Save pgbytes/8bed262683efb66ce58f to your computer and use it in GitHub Desktop.
Display documents with array elements - matching the given condition in the array elements - gives back only the matching array elements
db.gSearchParseResultBundle.find({"units.displayedUrl":"www.toptarif.de/gasvergleich"},{_id:0, units:{$elemMatch:{"displayedUrl" : "www.toptarif.de/gasvergleich"}}});
db.task.find({"workflow.workflowSteps":{$elemMatch:{"worker":"googleSearchParserWorker", "status":"FAILED"}}});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment