Using options.filter working well for displayName, name, emails, phoneNumbers etc and returns only matched contacts, but it is not working for photos and retuning unmatched contacts too as I want to fetch only those contacts having photos. cordova-plugin-contacts
Function onSuccess (contacts) {
console.log(contacts);
};
function onError(contactError) {
alert('onError!');
};
// find all contacts with 'Bob' in any name field
var options = new ContactFindOptions();
options.filter = "content://";
options.multiple = true;
options.hasPhoneNumber = true;
var fields = [navigator.contacts.fieldType.photos];
navigator.contacts.find(fields, onSuccess, onError, options);