dynamically changing value of nested object when using setState