traverse component objects and build up dictionary