I was trying to get the information of tracking in the UPS. I got on of the method from the core (
app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups.php => method name
getTracking($trackings)) that gives me the output that I want. But it's format in object form kind of as shown below.
So my question is how can I convert object in array?
Mage_Shipping_Model_Tracking_Result Object ( [_trackings:protected] => Array (  => Mage_Shipping_Model_Tracking_Result_Status Object ( [_data:protected] => Array ( [carrier] => ups [carrier_title] => United Parcel Service [tracking] => 1Z90Y8A21294899248 [service] => UPS 3 Day Select [shippeddate] => 20180910 [weight] => 6.00 LBS [status] => Order Processed: Ready for UPS [deliverydate] => 2018-09-10 [deliverytime] => 06:31:46 [deliverylocation] => [signedby] => [deliveryto] => US [progressdetail] => Array ( ) ) [_hasDataChanges:protected] => 1 [_origData:protected] => [_idFieldName:protected] => [_isDeleted:protected] => [_oldFieldsMap:protected] => Array ( ) [_syncFieldsMap:protected] => Array ( ) ) ) [_error:protected] => )
I have already tried with the getData(), also (array) $obj but that's not working giving blank responce.