The pattern matching is basically a switch on steroids, you can create powerful conditions such based on Object properties or Array content without manipulating the Object or Array itself.
Collect.js is a convenient and dependency free wrapper for working with arrays and objects.