JSON format is saved in MySql column like this:
[{"id":1},{"id":2},{"id":3,"children":[{"id":4},{"id":5}]}]
And I did this in Laravel Blade;
@php
$json = $categories->column;
$array= json_decode($json , true);
@endphp
@foreach ($array as $key => $value)
<li>{{ $value["id"] }}</li>
@endphp
And I get a result like this;
1 2 3
But I can't get children results. What should I do for it? Thanks for your help.