I am facing an issue with the JSON structure for the data I should pass to the server. Below is the required format.
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"}}]}'
My code is
var data = {'listingHotspots':[]};
data['listingHotspots'].push({'PropertyGuid':savedGuid,'Hotspot': {'Coordinates':coord_string}});
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.
JSON.stringify, and he will in fact need that (or equivalent) when posting.