Working logic to retrieve groups from CKAN