.serialize javascript array question
I've used the .serialize method before on form objects but how can I serialize a standard javascript array?
- // this doesn't work
- var myarray = [1, 2, 3, 4];
- myarray.serialize();
- //error returns: Uncaught TypeError: Object 1, 2, 3, 4 has no method 'serialize'