Define and send an array of JSON objects

I'm looking for a way to define and send an array of JSON objects. I 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 missing ...

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

      

convert it to string

  var myJSONText = JSON.stringify(myColumnSetting, false);

      

+2


a source to share


1 answer


var myColumnSettings = [{"ColumnName": name, "ColumnIndex", index}, {"ColumnName":othername, "ColumnIndex":otherindex}]

      



will be like an array of objects with custom columns. Is this what you mean?

+4


a source







All Articles