use to potentially solve this problem - quickly. Speed is important
Did some research but haven't found much of anything useful
Given an array of objects, I want to search the values of multiple keys - typically no more than 2.
Current search looks sorta like this
filter(obj => some(key => toLower(obj[key]).includes(toLower(query)))
It works well, it's easy to search for multiple pieces of data but it doesn't scale
Any ideas?
This is how to ask a question folks :)
I only noticed that you’re making the lowercase of the query every time. Try to extract that part. Maybe checkout Fuse.js?
Обсуждают сегодня