Storage from @ionic/storage is an observable, which makes it a little harder to deal with. Say I want to use two values from storage, I can do this:
let a,b;
this.storage.get('a').then((data) => {
a = data;
this.storage.get('b').then((data) => {
b = data;
doSomething(a, b);
});
});
But that’s pretty ugly, and would be worse if I needed 10 items. How can I do the storage accesses in parallel and then work with the results? Or how do I chain the observables without hierarchy hell? Thanks!