So I just finished the Course and understood how to use aggregate but when i use the aggregation and use var_dump it just shows me this

how do I save the candidate_id value to a array or variable ?
I tried using foreach loop like this
the aggregation code and for loop
$cursor4 = $collection3->aggregate([['$project' => ['_id' => 0, 'Blocks.FirstBlock.candidate_id' => 1]]]);
$result = $cursor4->toArray();
foreach ($result as $row)
{
$canid[] = $row["candidate_id"];
}