var the_arr = [ {"id":1,"name":"Tom"}, {"id":2,"name":"Cathy"}, {"id":3,"name":"Jack"}]; var the_obj = the_arr[1]; var the_obj_ = {"id":1,"name":"Tom"}; console.log(the_arr.indexOf(the_obj)); //return 1 console.log(the_arr.indexOf(the_obj_)); //return -1