I'm having a difficult time with something that should be (and probably is) pretty basic. I have a constructor as follows:
function search_table(v1, v2, v3) {
this.field = v1;
this.condition = v2;
this.value = v3;
}
My application has an array of search_table which gets JSON.stringify(ied) and then stored in localStorage.
My question is... when I retrieve the object from localStorage, it's in JSON string format. How do I get it back into the search_table[] format?
I'd prefer to do this without jQuery if possible. Thanks
I've tried to use something like the following:
var search_array = JSON.parse(string_val);
But it doesn't allow me to access search_array[i].condition as an example.
string_val.