Cognizant interview question

Q. How to iterate through objects?