Created
November 10, 2009 14:56
-
-
Save jonmagic/230925 to your computer and use it in GitHub Desktop.
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
# get some fruit! | |
orange = { "name": "Orange", "owners": [{ "Jon": 2 }, { "Steve": 5 }] } | |
apple = { "name": "Apple", "owners": [{ "Jon": 4 }, { "Bill": 2 }] } | |
pear = { "name": "Pear", "owners": [{ "Jon": 1 }, { "Tom": 3 }] } | |
# save the fruit | |
db.foo.save(orange) | |
db.foo.save(apple) | |
db.foo.save(pear) | |
# how do I find all fruit owned by Jon, and how much of that fruit he owns? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment