Getting filtered array from a JavaScript array by filter using...