This function is intended to replicate behaviour of the Array.filter() function but for Objects.
If an array is passed in instead then it will perform standard filter(). It is recommended to
always use the standard filter() function when it is known that the object is actually an array.
Parameters
obj: filterableItem
The Object (or Array) to be filtered
fn: filterCallback
The function to be processed for each filtered property
thisArg: filterableItem = undefined
Optional. Value to use as this when executing callback.
This function is intended to replicate behaviour of the Array.filter() function but for Objects. If an array is passed in instead then it will perform standard filter(). It is recommended to always use the standard filter() function when it is known that the object is actually an array.