JS and JSON - how find number of position

I have JSON file with users_id array. On this array I have active users, so this numbers are not sequential. How I can check (on jQuery) number of position users_id = 18 (answer = 3)? Next I want read value from other string so I can read json.data_todo_counter[3].