Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let myMap = new Map()
- myMap.set('Theta', new Map())
- myMap.get("Theta").set('Flying Shrimp', 10)
- myMap.set('Sigma', new Map())
- myMap.get('Sigma').set('Space cow', 380)
- myMap.set('Tau', new Map())
- myMap.get('Tau').set('Flying Shrimp', 165)
- let myMapSorted = new Map([...myMap.entries()].sort((x,y)=> { return [...y[1].entries()][0][1] - [...x[1].entries()][0][1]}))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement