Bootstrap Input datalist

I am getting a result set of data from a SQLite query:

    function GetCustomersFromSQL(){
    DB = SqlOpenDatabase("pts.db3", "1.0", "PTS");  
    var sqlList;
    sqlList=[];
    sqlList[0]=["SELECT id, customer_name from customer ORDER BY customer_name;" , [],    ResultToHomeCustomerInput];
    Sql(DB, sqlList);
    };

I want to run this function to set a Bootstrap Input Datalist to the result of the call back.

function ResultToHomeCustomerInput(transaction, results){
    DBRecords = results;
    inputCustomer.datalist = DBRecords;

//    for(i=0; i<=DBRecords.rows.length-1; i++){
//      DBRecords.rows.item(i)['customer_name'];
//    }
};

Do I need to build a loop like in the commented lines to load the inputCustomer.datalist array?

Ryan

datalist is an array of values, so build an array, then assign it to datalist.

Thank you! Here is what I did in case anyone else is curious.

function ResultToHomeCustomerInput(transaction, results){
    DBRecords = results;
    var arrCustomers = [];
    for(i=0; i<=DBRecords.rows.length-1; i++){
      arrCustomers.push(DBRecords.rows.item(i)['customer_name']);
    }
    inputCustomer.datalist = arrCustomers;
};