title: MYSQL Update only one key:value inside a json array
body: <p>I need to be bale to reset just one value for one json key</p>
  
  <pre><code>{
  "newsletter":"1",
  "contactcategories":"40",
  "newslettermessagetitle":"Hey hey its  the monkeys",
  "newslettermessage":"And we got something to say...."
  }
  </code></pre>
  
  <p>I'm trying to work out how i can format a MYSQL UPDATE query that will leave everything alone in that json but only change the 1 to 0 for the newsletter key.</p>
  
  <p>So basically this ends up my result:</p>
  
  <pre><code>{
  "newsletter":"0",
  "contactcategories":"40",
  "newslettermessagetitle":"Hey hey its  the monkeys",
  "newslettermessage":"And we got something to say...."
  }
  </code></pre>
  
  <p>I have this so far but cant wrap my head around it. Is it even possible to update only one json key and value using a mysql query?</p>
  
  <pre><code>UPDATE #__table 
  SET params='(SELECT *
              FROM #__table
              WHERE params LIKE '%\"newsletter\":\"1\"%')'i WHERE id='$id'
  </code></pre>
  
  <p>Thanks to any one who can help :)
  Jonny</p>