string exists in an array of strings in javascript + ignore case
Check if a string exists in an array of strings in javascript ignoring case.
objArray.map(function(item){ return item.toLowerCase()} ).indexOf(searchString.toLowerCase()) != -1
Written by Prasad Surase
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Search
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#