update value from an object using key es6 code example
Example: updating a key value on javascript object es6
var obj = {id: 1, name: "Adam"}
console.log(obj) // {id: 1, name: "Adam"}
obj = {...obj, name: "Eve"}
console.log(obj) // {id: 1, name: "Eve"}