title: Convert Php array to JavaScript array exception with apostrophe
body: <p>This code work </p>
  
  <pre><code>let json_data = '&lt;?php echo json_encode(["name" =&gt; "test"]) ?&gt;';
  let data = JSON.parse(json_data);
  </code></pre>
  
  <p>Problem this code   </p>
  
  <pre><code>let json_data = '&lt;?php echo json_encode(["name" =&gt; "cote d'ivoire"]) ?&gt;';
  let data = JSON.parse(json_data);
  </code></pre>
  
  <blockquote>
    <p>Uncaught SyntaxError: Unexpected identifier</p>
  </blockquote>
  
  <p>How can fix it</p>