Small helper to assist you with finding/filtering elements in an array by a specific key.
npm install find-by --save
const by =const list =title: 'A New Hope' episode: 'IV'title: 'The Empire Strikes Back' episode: 'V'title: 'Return of the Jedi' episode: 'VI'console// => The Empire Strikes Back
For common keys there are also the shorter versions
const by =const list =id: 15 name: 'Foo'id: 42 name: 'Bar'id: 10 name: 'Baz'console// => Bar