Skip to content

Instantly share code, notes, and snippets.

@kobaatsu
Last active March 22, 2018 02:52
Show Gist options
  • Save kobaatsu/95891f636b5a968d674dc05843d08d37 to your computer and use it in GitHub Desktop.
Save kobaatsu/95891f636b5a968d674dc05843d08d37 to your computer and use it in GitHub Desktop.
[objectをソートしてイテレーション]
- var menu = [{order:20, label:'foo'},{order:10, label:'bar'}]
- menu.sort((a,b)=>{return a.order > b.order ? 1 : -1})
each m in menu
li= m.label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment