-
-
Save amyberman3/4065561e7c817af4bd19 to your computer and use it in GitHub Desktop.
p4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fetch the Product document identified by this catalog number | |
> product = db.products.findOne({catalog_number: 1234}); | |
// Fetch all the Parts that are linked to this Product | |
> product_parts = db.parts.find({_id: { $in : product.parts } } ).toArray() ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment