get value from object correctly