No need to convert an object to an array to use it, just use the correct syntax.

E.g. echo $result->name