Hi i have to create a json sting in javascript like this
{widget_list:[{widget_id:1,new_position:2},{widget_id:2,new_position:3}, . . .]}
using json.org library. Function i am using of this library is
var json_text =
JSON.stringify(uploaded, “”, “”);
Which creates a perfect json string i am able to generate when there is a no array
function uploaded()
{
}
var uploaded = new Uploaded();
uploaded.widget_id = 1;
uploaded.new_position = 2;
var json_text = JSON.stringify(uploaded, "", "");
when u alert json_text u will get {“widget_id”:1,”new_position”:2} requirment is just download a file json2.js from json.org for javascript and include it.
so please help some logic issue i am unable to create….
thanks in advance….
alert will give