0

I've added a bunch of 'cards' into my mongodb and am trying to find a way to find a card based on multiple fields (such as strength, defense, ability, type, and color) instead of just one (i.e., just name). I'm new to mongodb and fairly new to java so I'm kind of at a loss. Any ideas? Your help is much appreciated.

1 Answers1

0

db.colection.find({name:"someName", strength:10})

or you can use some extra criteria to find value greater than sth:

db.colection.find({name:"someName", strength: {$gt : 10}})

you can find more here http://docs.mongodb.org/manual/reference/method/db.collection.find/

marcino0o
  • 193
  • 1
  • 9