I am a Full Stack Web Developer in Seattle, WA. I live my life with an unquenchable thirst for knowledge and improvement, which is what drew me to working with software in the first place.
Here is the rest of what I'm doing with this data:
let momentsList = [];
this.props.moments.forEach(({ id, location }) => momentsList.push({ id, location }));
let uniqueSet = [...new Set(momentsList.map(moment => moment.location))];
The data being returned, stored in momentsList, and manipulated, is an array of objects (as you can see). Using let sortedList = uniqueSet.sort() worked for it. I think because I'm getting the id and location, then mapping the location.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yes, yes, yes! It's all coming back now.
Follow-up:
Here is the rest of what I'm doing with this data:
The data being returned, stored in
momentsList
, and manipulated, is an array of objects (as you can see). Usinglet sortedList = uniqueSet.sort()
worked for it. I think because I'm getting theid
andlocation
, thenmap
ping thelocation
.