Is there a good way to encode a JavaScript object as JSON?
I have a list of key value pairs ... where the name is indicated from the checkbox, and the value is either true or false depending on whether the checkbox is checked or not:
var values = {}; $('#checks :checkbox').each(function() { values[this.name]=this.checked; });
I want to pass these values ββto a JSON object in order to save in a cookie to display the table (columns will be added according to what the user disconnects).
Does anyone know a solution?
json javascript jquery hashtable checkbox
daniel langer Jun 06 '12 at 18:26 2012-06-06 18:26
source share