I have a lot of JSON data I need to pass to a request:
$.ajax({
type: "POST",
url: "http://"+HOST+"/users/rankings",
data: "friends="+JSON.stringify(friendsArr),
success: function(response){
$("#rankings").html(response);
}
});
friendsArr is an array of objects in JSON format. The issue is that some objects have data with a "+" and that does not get encoded properly. It comes in server side as a " " and the data is messed up. Do I really have to iterate through all the data and encode each value separately? There must be an easier way.