Hi I am trying to post an array of javascript objects back to the server, using dojo.
I have an array of data that is like appears like this:
var elements = [
myobj = {id:"1", name:"myname", title:"mytitle"},
myobj = {id:"2", name:"myname2", title:"mytitle2"}
]
I want to post this as a json string back to the server to be handled by a PHP script. However dojo.toJson will only seralise an individual object.
How can I convert the entire array of objects into a json string that can be posted to the backend for processing?
many thanks