How could I use
window.localStorage.getItem();
to specify items in localstarage that start with the string \'QQ\'. In my case the key
\'QQ\'
Came across this and here is a solution in es6 :
let search = 'QQ'; let values = Object.keys(localStorage) .filter( (key)=> key.startsWith(search) ) .map( (key)=> localStorage[key] );