I am trying to get contact name, email and phone from google contact api from contact feed http://www.google.com/m8/feeds/contacts/default/full
var entries = result.feed.entry;
for (var i = 0; i < entries.length; i++) {
var contactEntry = entries[i];
var emailAddresses = contactEntry.getEmailAddresses();
for (var j = 0; j < emailAddresses.length; j++) {
var emailAddress = emailAddresses[j].getAddress();
vemail += emailAddress + ',';
}
var fname = contactEntry.getPhoneNumbers();
if (phoneNumbers.length == 0) {
console.log('phone number = N/A');
} else {
for (var j = 0; j < phoneNumbers.length; j++) {
var phoneNumber = phoneNumbers[j].getValue() || 'N/A';
console.log('phone number = ' + phoneNumber);
}
}
}
I can get phone number and email from the code above. May I know how to get the name too? Thanks