title: Proper way to import json file to mongo
body: <p>I've been trying to use mongo with some data imported, but I'm not able to use it properly with my document description.</p>
  
  <p>This is an example of the .json I import using mongoimport: <a href="https://gist.github.com/2917854" rel="noreferrer">https://gist.github.com/2917854</a> </p>
  
  <pre><code>mongoimport -d test -c example data.json
  </code></pre>
  
  <p>I noticed that all my document it's imported to a unique object in spite of creating one of object for each shop.</p>
  
  <p>That's why when I try to find a shop or anything I want to query, all the document is returned.</p>
  
  <pre><code>db.example.find({"shops.name":"x"})
  </code></pre>
  
  <p>I want to be able to query the db to obtain products by the id using dot notation something similar to:</p>
  
  <pre><code>db.example.find({"shops.name":"x","categories.type":"shirts","clothes.id":"1"}
  </code></pre>
  
  <p>The problem is that all the document is imported like a single object. The question is: How<br>
  do I need to import the object to obtain my desired result?</p>