title: Insert nested array from json response into mysql
body: <p>I have the following JSON response received from the client:</p>
  
  <pre><code>{
      "name": "Joel",
      "cities_visited": [{
          "city1": "Chicago",
          "city2": "Seattle"
      }],
      "active": true
  }
  </code></pre>
  
  <p>I am using <code>json_decode</code> to get the results but having problems inserting the cities_visited as one single set of data into mysql. I have also tried with <code>json_decode($json, true)</code> with no luck. </p>
  
  <p>Can anyone give me some insight how to get this data formatted properly prepared so i can insert into my db?</p>
  
  <p>I need to somehow get this cities_visited array into one entry row on mysql and then be able to get it out and return it as the same with json_encode</p>