Being new on the forum (well found a lot of answers already) hereby my first question:
When filling an indexedDB with data (using dixie) I want to refer dynamically to the different stores. For now i solved it by using cases:
switch (i){
case 1: db.Reactor_1.bulkPut(result); break;
case 2: db.Reactor_2.bulkPut(result); break;
case 3: db.Reactor_3.bulkPut(result); break;
case 4: db.Reactor_4.bulkPut(result); break;
case 5: db.Reactor_5.bulkPut(result); break;
case 6: db.Reactor_6.bulkPut(result); break;
}
i++;
i have tried different notations to concatenate the number into the call:
db.'Reactor_'+i.bulkPut(result);
db.Reactor_{i}.bulkPut(result);
eval("'db.Reactor_'+i+'.bulkPut(result);');
and a few more but none work. How can this be achieved?
My question is being labeled as already answered. That particular answer I had found before and tried all suggestions but none work...