i am using ionic-native contacts plugin
using pick contact i am getting specific contact details, how to modify this contact and save it .
this.contacts.pickContact().then((Contact)=>{
console.log("contacts:-->"+ JSON.stringify(Contact));
});
i found the solution for this
this.contacts.pickContact().then((Contact)=>{
console.log("contacts:-->"+ JSON.stringify(Contact));
this.clonecontact(selectedcont);
});
clonecontact(selectedcont){
console.log("clone contact called");
console.log("clone:-->"+ JSON.stringify(selectedcont));
selectedcont.phoneNumbers = [new ContactField('mobile', '99......3')];
selectedcont.save().then(
() => console.log('Contact saved!'),
(error: any) => console.error('Error saving contact.', error)
);
}