Added stdClass object to array conversion