title: Select, Handle and Insert/Update JSON data type
body: <p>I am using a Node.JS server with a MySQL database and I just realised that MySQL supports JSON as a data type.</p>
  
  <p>Based on my previous statement how do I a) <code>SELECT</code> <code>JSON</code>, b) handle results in my node.js code and c) then <code>UPDATE</code>the DB entries again in <code>JSON</code>?</p>
  
  <p>Code example for parts a and b:</p>
  
  <pre><code>sql.getConnection((err, con)=&gt;{
              con.query("SELECT test FROM test", (error, row)=&gt;{
              con.release();
              if(error) throw error;          
              console.log(row[0].test);
              });
  });
  </code></pre>
  
  <p>this snippet of code returns: <code>{"entryid": {"a": 1, "b": 2, "c": 3}}</code>,</p>
  
  <p>now if i try to do something like this: <code>console.log(row[0].test./*any sub-key here*/);</code> it returns <code>undefined</code>.</p>