title: Decode JSON directly in MySQL query, possible?
body: <p>Is it possible to decode a JSON string stored in MySQL directly in the query with PHP?</p>
  
  <pre><code>$sql = '
    SELECT
      first_name,
      last_name,
      email,
      lots,
      more,
      fields,
      and,
      one,
      is,
      a,
      json,
      string
    FROM
      tblname
  ;
  
  $sth = \db()-&gt;prepare( $sql );
  $sth-&gt;execute();
  
  return json_encode( $sth-&gt;fetchAll() );
  </code></pre>
  
  <p>One or more of the select fields is a JSON string, and it would be great if it was somehow possible to decode said string without manually parsing the data and rebuilding the array.</p>