flat object equality function