$nested = []; if(isset($DBobject->nested)) { $nested = $DBobject->nested; } $nested['nested_key'] = 'nested_value'; $DBobject->nested = $nested; $DBobject->save();
That's how I've done it