Iterates over the keys of an object.