var group_list = function(grps) { var grp_collection = new Set() grps.forEach(function(lemma){ lemma.standardisations.forEach(function(grp){ grp_collection.add(grp.tags[0] == 'subst' ? grp.tags[0] + ',' + grp.tags[1] : grp.tags[0]) }) }) return Array.from(grp_collection).join('; ') } export default { group_list}