title: How to create a JSON object in javascript
body: <p>I am facing an issue with the JSON structure for the data I should pass to the server. Below is the required format.</p>
  
  <pre><code> var data = '{"listingHotspots": [{"PropertyGuid": "5dc934f6-cb5a-44d4-95e6-cf7d5712359e","Hotspot": {"Coordinates": "581,391,676,391,677,410,714,410,715,562,599,562,598,527,597,473,597,409,580,407,581,391"}}]}'
  </code></pre>
  
  <p>My code is </p>
  
  <pre><code> var data = {'listingHotspots':[]};
      data['listingHotspots'].push({'PropertyGuid':savedGuid,'Hotspot':    {'Coordinates':coord_string}});
  </code></pre>
  
  <p>This is creating a valid JavaScript object but not the one i need. I also used JSON.stringify() but it resulted in a Undefined value. Any help would be greatly appreciated.</p>