Array key exists for JS