The following code send by using Ajax a json :
var geojson = new Object();
geojson["type"] = "FeatureCollection";
geojson["zone_type"] = "Zone";
$.ajax({
url : url,
type : 'POST',
data : geojson,
dataType : 'json',
});
However, when I ask in the console "geojson" and when I look the request in the network :
geojson = "[object Object]"
Actually, I should have the object :
geojson = {type:FeatureCollection,zone_type:Zone}
Shouldn't I ?