title: How to insert a json array data into mysql in node.js?
body: <p>My json be like :</p>
  
  <pre><code>var data = [ {month: 1, customer: 11, revenue: 200},
               {month: 2, customer: 13, revenue: 210}
             ];
  </code></pre>
  
  <p>But when I inserted it into database using sql query
  <code>"INSERT into t1 VALUES (data)"</code>, 
  I got error : <code>{"code":"ER_INVALID_JSON_TEXT","errno":3140,"sqlMessage":"Invalid JSON text: \"Invalid value.\" at position 1 in value for column t1.data</code></p>
  
  <p>How should the correct query syntax be like? Any answer will be very appreciated</p>