re: Are there functions similar to Ruby's `dig` in other languages? VIEW POST

FULL DISCUSSION
 

In Laravel you could use this with Arr::get helper method.

use Illuminate\Support\Arr;

$array = ['products' => ['desk' => ['price' => 100]]];

$price = Arr::get($array, 'products.desk.price');

// 100
code of conduct - report abuse