Getting dynamic object from iterator