Skip to content

Instantly share code, notes, and snippets.

@bryzettler
Last active June 1, 2017 03:45
Show Gist options
  • Save bryzettler/638e3c7519bba762f1754912b1174ae5 to your computer and use it in GitHub Desktop.
Save bryzettler/638e3c7519bba762f1754912b1174ae5 to your computer and use it in GitHub Desktop.
const records = [
{ title: "The Clash", artist: "The Clash", type: "LP", lengthSec: 2220, released: "1977"},
{ title: "Rocket to Russia", artist: "Ramones", type: "LP", lengthSec: 1906, released: "1977"},
...etc
];
records.filter(record => record.lengthSec > (60 * 60))
.map(record => ({
...record,
['display']: `${record.artist} - ${record.title} (${record.released})`
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment