Get name from the object into state