Function enumerateObject

Iterates through the object