title: how to implement user defined rules in node.js?
body: <p><img src="https://i.stack.imgur.com/pDsbm.png" alt="user defined rule sample"></p>
  
  <p>I need to implement a user defined rules engine like the one above (technologies used: nodejs + mongodb)</p>
  
  <p>i come across a SO Q's which does the data store in MySQL, but i have no idea how to query the data and get it eval via javascript:</p>
  
  <p><a href="https://stackoverflow.com/questions/1902951/what-is-an-appropriate-data-structure-and-database-schema-to-store-logic-rules">What is an appropriate data structure and database schema to store logic rules?</a></p>
  
  <p>any ideas about the design &amp; implementation is highly appreciated.</p>
  
  <p>Sunny</p>