How can we fetch the values based on the condition, I tried as follows
var countrynames = Alloy.Collections.countryDetails;
countrynames.fetch({languageID: 1});
countrynames.on("reset", function() {
var countrynamesLength = countrynames.length,
column = Ti.UI.createPickerColumn();
for (var i = 0; i < countrynamesLength; i++) {
var row = Ti.UI.createPickerRow({
title: countrynames.at(i).get("countryText")
});
column.addRow(row);
}
$.countryPicker.columns = [column];
});
countrynames.fetch({languageID: 1});
But the above does not filter the condition. It is fetching all the values from the table. How to use the where condition for the above code.
please any suggestions..