I have a JavaScript object that contains two arrays. One of the arrays is an array of objects and the other is just a straight forward array.
i.e.
obj = {
arr1: [
{
a1: 'val',
a2: 'val'
},
{
b1: 'val',
b2: 'val'
}
],
arr2: ['a', 'b', 'c']
};
I am trying to pass this whole lot as on object to PHP to store in a MySQL database. How best should I go about this so that I can eventually pass it back to JavaScript in the same structure as it started out as?
Many thanks for any help.