Implemented 'key' param to specify which field should be used as key for map_iterator.