I have a value stored in an array variable called item
which contains the following:
var item = JSON.stringify(product);
cartproduct[cartproduct.length] = item;
The item
variable stores data like this:
{
"Product": "1001",
"Brand": "Dell",
"Model": "Inspiron ",
"Price":"25000"
}
My goal is to display the data from item
in corresponding jqgrid columns such as Product, Brand, Model, etc.
I came across a jsFiddle example at http://jsfiddle.net/amorris/yNw3C/
Now I just need the content of my item
variable to be in the same format as data
.
var data = [[48803, "DSK1", "", "02200220", "OPEN"]];
var item = [[1000,"Sony","Vaio",40000]];