How can i access and change a value in an object with an array of keys