2015-12-08 43 views

回答

1

我使用此解決方案:

var query = 'abc'.toLowerCase(); 
var result = []; 
db.query('query_group/query_name') 
    .then(function (data) { 
    for (var i = 0; i < data.rows.length; i++) { 
     if (data.rows[i].value.someField.toLowerCase().indexOf(query) > -1) { 
     result.push(data.rows[i].value); 
     } 
    } 
    });