Jeff Salter
Posts: 0
Joined: Sun Jul 05, 2015 2:30 pm

Loop Array to Database

I have a array of data that I mapped in a create_service to my database but I can only get one record to record when I invoke the service. I understand that I need to do this with a loop. I've created such loops with a checkbox list but that is using local storage and a service, but I am not familiar with doing this to a database. Can you assist me with sample code to accomplish this? Here is what I have so far and I am running javascript on a button click:

var items = Apperyio.storage.messageDBList.get();
for (var i = 0; i < items.length; i++) {
sms_local_db.execute();

}

Return to “Issues”