php – Obtaining matrix and matrix within matrix

I request an object matrix with this line that returns this matrix:

            0 =>
matrix
& Id; & # 39; id & # 39; => 1,
& # 39; name & # 39; => & # Cfop & # 39 ;,
& # 39; full_name & # 39; => & # 39; CFOP & # 39 ;,
& # 39; pivot & # 39; =>
matrix
& # 39; product_id & # 39; => & # 39; 1 & # 39 ;,
& # 39; tax_id & # 39; => & # 39; 1 & # 39 ;,
& # 39; value & # 39; => & # 39; 1.00 & # 39 ;,
)
)
1 =>
matrix
& Id; & # 39; id & # 39; => 5,
& # 39; name & # 39; => & # CfopDev & # 39 ;,
& # 39; full_name & # 39; => & # 39; CFOP DEV & # 39 ;,
& # 39; pivot & # 39; =>
matrix
& # 39; product_id & # 39; => & # 39; 1 & # 39 ;,
& # 39; tax_id & # 39; => & # 39; 5 & # 39 ;,
& # 39; value & # 39; => & # 39; 2.00 & # 39 ;,
)
)
)  

How can I access the matrix and the & # 39; pivot & # 39;Matrix object?
I need to take the first name index value and go through pivot to take the value