Enhance astobj2 to support other types of containers.