Issue Storing Arrays In Sqlite Using Javascript
I've been using Cordova and the storage adapter for SQLite. When I store objects using JSON.stringify and the retrieve them they work. I also have several fields that are arrays, b
Solution 1:
I don't see any problem ,you can access initial array after parsing (JSON.parse(yourStringifiedArrayString)).
var yourarr=["test1", "test2", "test3"];
var afterStringify = JSON.stringify(yourarr);
console.log('After Stringify:'+afterStringify);
var prevArr=JSON.parse(afterStringify);
console.log('After Parsing:'+prevArr);
//now access your arrayalert(prevArr[1]);//will show test2
Post a Comment for "Issue Storing Arrays In Sqlite Using Javascript"