I have an array with some values. How can I search that array using jquery for a value which is matched or close to it?
var a = [\"foo\",\"fool\",\"cool\",\"
You can use find method on array if you want to match any regex :
Array.find(x => /^left:/.test(x)