Skip to content

Instantly share code, notes, and snippets.

@mischah
Created July 29, 2015 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mischah/867ae2e8eee1ce0f213e to your computer and use it in GitHub Desktop.
Save mischah/867ae2e8eee1ce0f213e to your computer and use it in GitHub Desktop.
var regions = _.chain(originalData[year])
.map()
.first()
.thru(function(object) {
return object.total.letters;
})
.map(function(value, region){
return project.i18n.getTexts('myI18nKey') + ' ' + region;
})
.value();
@jdalton
Copy link

jdalton commented Jul 29, 2015

I don't think there's a need for the empty map and you can use .get('total.letters') instead of thru.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment