Support MB Settings Page Getting Field Value Reply To: Getting Field Value

#10036
davidrknowlesdavidrknowles
Participant

just to get your thoughts and for others reading this, would just using something like array_walk_recursive be the best course of action to collect all the keys and values into a single object, like:

$group_values = rwmb_meta( 'group_in_question', array( 'object_type' => 'setting' ), 'settings_option_name' );
$found = [];
array_walk_recursive($group_values, function($value, $key) use (&$found)  {
        $found[$key] = $value;
});
return $found;