title: MongoDb run command from string
body: <p>I have a mongo query in string format. How can I run this string query on mongo?</p>
  
  <p>I can run this on mongo shell:</p>
  
  <pre><code>db.getCollection('myCollenction').find({})
  </code></pre>
  
  <p>How can I run the same command on node.js mongo native driver?</p>
  
  <pre><code>var query = "db.getCollection('myCollenction').find({})";
  db.runCommand(query);
  </code></pre>
  
  <p>I have a mongodb query builder and now I need to get the generated query and execute on mongo.</p>
  
  <p>I'm using node.js 8.11.1 and mongodb native node driver 3.1</p>
  
  <p><strong>Edit</strong> </p>
  
  <p>I found that I can run the mongodb <strong>eval</strong> funtion to do that, but it is deprecated. There's another way to do that? Or there's another way to get the generated condition on jquery-querybuilder and execute on my mongo database to get the results?</p>