NEW: generate JSON data for the map of groups based on the metadata in related pages