views:

82

answers:

1

I'm looking for a way to define and send a JSON object array. I've figured out how to define a single JSON object, turn it into a string and send it, but what about an array of this type? Probably something simple I'm overlooking...

var myColumnSetting = { "ColumnName": name,
                        "ColumnIndex": index
                    }

convert it to a string

  var myJSONText = JSON.stringify(myColumnSetting, false);
+3  A: 
var myColumnSettings = [{"ColumnName": name, "ColumnIndex", index}, {"ColumnName":othername, "ColumnIndex":otherindex}]

would be like an array of columnsetting objects. Is this what you mean?

Gabriel
yes, an array of columnsetting objects is what I meant.
Eric
Excellent, glad it all worked out.
Gabriel