in_array analog in js