map functionality for objects.