title: How can I return an array of mongodb objects in pymongo (without a cursor)? Can MapReduce do this?
body: <p>I have a db set up in mongo that I'm accessing with pymongo.</p>
  
  <p>I'd like to be able to pull a small set of fields into a list of dictionaries.  So, something like what I get in the mongo shell when I type...</p>
  
  <pre><code>db.find({},{"variable1_of_interest":1, "variable2_of_interest":1}).limit(2).pretty()
  </code></pre>
  
  <p>I'd like a python statement like:</p>
  
  <pre><code>x = db.find({},{"variable1_of_interest":1, "variable2_of_interest":1})
  </code></pre>
  
  <p>where x is an array structure of some kind rather than a cursor---that is, instead of iterating, like:</p>
  
  <pre><code>data = []
  x = db.find({},{"variable1_of_interest":1, "variable2_of_interest":1})
  for i in x:
      data.append(x)
  </code></pre>
  
  <p>Is it possible that I could use MapReduce to bring this into a one-liner?  Something like</p>
  
  <pre><code>db.find({},{"variable1_of_interest":1, "variable2_of_interest":1}).map_reduce(mapper, reducer, "data")
  </code></pre>
  
  <p>I intend to output this dataset to R for some analysis, but I'd like concentrate the IO in Python.</p>