change groups json structure