So I have an array of objects like this:
var data = [{
id : 1,
firstName : 'John',
secondName : 'Doe',
email : 'johndoe@mail.com'}];
I have a function called update which asks user for an id and updates the data with same id with the values given by the user. For example:
function update(firstName,lastName,email,id)
How can I update the data array based on id provided by the user and also return true if the specified id was found?