How do I read a JSON file and access its properties?

If you want to loop the menus from the json, then you need to use the data attribute where the menus actually are.

Also you may want to use the current iteration $menu slug in the get_term_by() call, unless you specifically want to check for existance of “Primary” menu on each iteration. If that is the case, then it might be more efficient to do the checking outside of the loop so it is done only once.

$menus = json_decode( $json_content );

if ( ! empty( $menus->data ) ) {
    foreach ( $menus->data as $menu ) {
        // code...
    }
}

deneme bonusu veren sitelerbahis casinomakrobetceltabetpinbahispolobetpolobet girişpinbahis girişmakrobet girişpulibet girişmobilbahis girişkolaybet giriş