If I had this structure
var data =
{
"people": [
{ "name" : "John", "id" : 1 },
{ "name" : "Marc", "id" : 2 }
]
}
I want to add more elements to this, in JavaScript, specifically in jQuery to then send it like this
var dataString = JSON.stringify(data);
$.post('some.php', { data: dataString}, showResult, "text");
http://jsfiddle.net/RK4bx/