title: Parse a string into conditions in javaScript?
body: <p>I have a string containing some conditions, for example: </p>
  
  <p><code>var str =  "this.demoModel.active == '1' &amp;&amp; this.demoModel.span &gt; 5 || ..."</code></p>
  
  <p>Is there a direct way in javascript to parse them so that, they work like a set of conditions. Something like: </p>
  
  <p><code>if (JSON.parse(str) {})</code>. ??</p>