79136506

Date: 2024-10-29 09:25:16
Score: 0.5
Natty:
Report link
        $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

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Yoan