You can use LocalDB or OnlineDB or just DB.
Example:
// JS
var batch = new LocalDB.Batch();
for(var i = 0; i < 200; i++) {
var item = LocalDB.item.create({message: 'Item ' + i});
batch.save(item);
}
batch.execute();
That is one way, but note that you do not have to save these objects if you are wanting to use them once-of. You can push the objects onto an array and then reference the array in the xml
// JS
var item_array = []
for(var i = 0; i < 200; i++) {
var item = LocalDB.item.create({message: 'Item ' + i});
item_array.push(item);
}
// XML
<var name="items" type="array:item" />
<var name="selected_item" type="item" />
<object-dropdown query="items" bind="selected_item" empty-message="Your items will appear here" required="false" />
@chansmann when using discard() or the built-in back button (top left hand corner), all unsaved changes to view variables will be discarded. Conversely, when using any other navigation (link, clear, replace, even dismiss, etc.) without discard, the current state of the view variables will be saved.
So if you want to avoid the auto-save, just start your navigation with a navigate.discard() and then chain the rest of the navigation, i.e. navigate.discard().link('some_path') or navigate.discard().replace('some_path')