Array Contains String Javascript Substring From Right