Added option to compare objects by key