make me a javascript code to find an object by its name deep inside a given object, make sure that this code does not use recursion and can return the path used to reach the object