title: How to get JSON type as JSON instead of String from Nodejs Mysql
body: <p>I have table say TEST(id INT, attribute JSON) in MySQL 5.7</p>
  
  <p>When I try to query the table in Nodejs using mysql package as follows</p>
  
  <pre><code>con.query("select * from TEST where id=?", [req.params.id], function (err, results) {
      if (err) throw err;
      console.log(results);
    });
  </code></pre>
  
  <p>I get the following output</p>
  
  <pre><code>[
     {
          "id": 2,
          "package": "{\"tag\": \"tag1\", \"item\": \"item1\"}"
      }
  ]
  </code></pre>
  
  <p>Is there a way to get the package item in the above result as JSON object instead of a string without iterating the array and do JSON.parse to convert string to JSON?</p>
  
  <p>Expected Output</p>
  
  <pre><code>[
         {
              "id": 2,
              "package": {"tag": "tag1", 
                          "item": "item1"}
          }
      ]
  </code></pre>