I have an array in which there is a values ​​field that has this structure

MongoDB\Model\BSONArray Object ( [storage:ArrayObject:private] => Array ( [0] => MongoDB\Model\BSONDocument Object ( [storage:ArrayObject:private] => Array ( [name] => %1548142370673% [value] => 321312 ) ) ) 

How can I get the php key (name) and its value (321312)?

    0