Not sure how to do this per the current implementation. I could probably do an `array_search($obj->toArray(), ...)` but that defeats the purpose of this library. Will make a PR tomorrow, unless someone does it before I wake up.