78
rated 0 times
[
84]
[
6]
/ answers: 1 / hits: 22581
/ 9 Years ago, tue, july 7, 2015, 12:00:00
I need to convert Javascript object to string and then this string back to object.
Objects i get like that:
var Checked = {};
// Hold all checkboxes
$('div.list input[type=radio]:checked, input[type=checkbox]:checked').each(function () {
var $el = $(this);
var name = $el.attr('name');
if (typeof (Checked[name]) === 'undefined') {
Checked[name] = [];
}
Checked[name].push($el.val());
});
I know how to do this with array by using join and split, but how to be with objects?
Now how to convert this object to string?
How to get back this string to object?
More From » jquery