I am running into an issue, I have a similar array of Strings in JS:
var myArray = [\"bedroomone\", \"bedroomonetwo\", \"bathroom\"];
And I
Improved Microfed's answer to this
var textToSearch = 'bedroom'; var filteredArray = myArray.filter((str)=>{ return str.toLowerCase().indexOf(textToSearch.toLowerCase()) >= 0; });