title: export a csv from mongodb
body: <p>I have two collections in my mongodb namely</p>
  
  <p>1.companies</p>
  
  <p>2.contacts</p>
  
  <p>Both the companies and contact collection are interlinked. I want to export a particular companies contact into a csv. I have tried a mongo export command as follows</p>
  
  <pre><code> mongoexport --csv -d dbname -c contacts 
   -q {"employment_details.company_id":ObjectId("50926cff9fe3125819006dc7")}; 
   -f {"first_name","last_name","title"} -o export.csv
  </code></pre>
  
  <p>I get a error as follows</p>
  
  <p>SyntaxError: missing ; before statement (shell):1.</p>
  
  <p>Please help me. Thanks in Advance</p>