Use jquery to check array