Filter by multiple fields

It’s not clear from your code what you’re trying to do.
But this is defiantly wrong:

const fieldToFilterByInCollection = 'location''type';