retrieving wishes to JS and grouping by types