I'm still relatively new to jquery so I was wondering what was the best practice for sending multiple variables to php using ajax. For example, should I send the variables in a package like:
$.ajax({
data:{
input: {x: 1, y: 2}
},
...
})
or send them as individual variable such as:
$.ajax({
data:{
x: 1,
y: 2
},
...
})
Is there any performance benefit or any other kind of benefit of using one over the other?
Thanks for your time, LL