Thanks for the reply.
myArray = ["bananas", "apples", "pears", "peaches", "oranges"];
is just an example to simplify what I am trying to do. I actually have a large form with hundreds of fields to send. That's why I wanted to do it with one JSON array and not with hundreds of hidden input fields.