javascript filter array if property exists