I have a large array, and I want to filter it based on a string I pass it. This string could be one or two characters, up to an entire string.
Here's an example array:
var data = ["bourbon", "beer", "electric"]
If I pass e, I want the result ["electric", "beer"].
How can I achieve this functionality?
beerobject that you're referencing?'beer', 'electric'.