title: Parsing + Evaluating Expressions From JSON Object without using Eval()?
body: <p>I'm building a node app in which users are (ideally) able to define styling - for geographic data - using a series of JSON objects:</p>
  
  <pre><code>{
      "style":
          {
              "test": "year",
              "condition": "&lt;= 1954 AND &gt;= 1936",
              "color": "red"
          }
  }
  </code></pre>
  
  <p>In the case above, I like to evaluate that style as</p>
  
  <pre><code>if (year &lt;= 1954 &amp;&amp; year &gt;= 1936){
      object.color = red;
  }
  </code></pre>
  
  <p>Is there an easy way to parse + evaluate such expressions/build them from such an object? I'm especially interested in letting people string together complex expressions built using &lt;=, >=, ||, &amp;&amp; etc. </p>
  
  <p>I'd like to avoid using eval(), if possible. </p>