Custom Command
FunctionsObject Functions

$objectMerge

Merge the current object with another object, it overwrites the conflicted keys

Usage

$objectMerge[object]

Example:

!!exec $objectSet[name;Mido]
$objectMerge[{"country":"EG"}]
$objectGet

{"name":"Mido", "country":"EG"}

Example (Nested Keys):

!!exec $objectSet[user;name;Mido]
$objectSet[user;country;EG]
Before: $objectGet
$objectMerge[user;{"name":"Rake","country":"DE"}]
After: $objectGet

Before: {"user":{"name":"Mido","country":"EG"}}
After: {"user":{"name":"Rake","country":"DE"}}

On this page