added a new function called view group members that gets the members for each group and returns it in json