javascript check if substring exists in array of strings