I’m writing a plugin for jQuery where I need to send a little piece of data to the server, but I need to set the var name of the json object I send:
var params = {name:'var_name'}
$.post('page.php', {params.name:'the value'}, function () { /* etc. */ });
how can I do it?
Use the array access syntax: