ok I have been reading about JSON and it seems like to make a JSON you are using STRINGIFY to build the object with each new "click".
I have also read that PARSE is used to break down the object that was created using stringify.
I guess now that this local storage variable is created, and it has this data packed, when I set a LABEL to this local storage variable no information is put into the LABEL.
var checkedItems = [];
var checkedItems = jQuery('[dsid="checkboxgroup"] input[type="checkbox"]:checked');
console.log("Checked items count = " + checkedItems.length);
//Iterate through checked items.
for(var i = 0; i < checkedItems.length; i++){
var checkedItem = jQuery(checkedItems);
var checkedText = checkedItem.closest("span").find("label").text();
var checkedValue = checkedItem.val();
//Just out this value to browser console. Please check out it to see results.
console.log("checkedItem[" + i + "] = " + checkedValue);
//Here you can use "checkedValue" JS variable as you need.
checkedItem.push({text: checkedText, value: checkedValue});
localStorage.setItem("checkedItemsLSV", JSON.stringify(checkedItem));
}
=======================================================
now I would like to see the data, so I should parse the data? Is that correct?
localStorage.setItem("checkedItemsLSV", JSON.stringify(checkedItem));
JSON.parse(checkedItem);
if the data is coming as check boxes in a single column, and all the values are entering a JSON, how do I get back my JSON values?