title: Send JSON data through AJAX
body: <p>I'm trying to send data from option selector </p>
  
  <pre><code>&lt;select id="city"&gt;
      &lt;option value="{'city':'melbourne','lat':'-37.8602828','long':'144.9631'}"&gt;Melbourne&lt;/option&gt;
  </code></pre>
  
  <p>Through an AJAX POST</p>
  
  <pre><code>$.ajax({
      method: "POST",
      url: "action.php",
      dataType: "json",
      data: {
          city: $('#city option:selected').val()
      },
  })
  </code></pre>
  
  <p>However I got an empty <code>$_POST</code> in <code>action.php</code>. What is the correct way to send the value of the selected option through an AJAX request?</p>