FunctionsObject Functions
$objectIncrease
To increase a key value, if the key doesn't exist, it will create one and set to that value
Usage
$objectIncrease[Key;Amount]Notes on Amount:
- It can be a number like
5, or negative-5to reduce instead of increase\ - It can be expression like x*2 where
xis the current value
Example 1:
!!exec $objectIncrease[Mido;10]
$objectIncrease[Rake;5]
$objectGet
{"Mido":10,"Rake":5}
Example 2:
!!exec $objectIncrease[Mido;10]
$objectIncrease[Mido;x*2]
$objectGet
{"Mido":20}