Skip to main content

Put

Add or replace the value for a key.

Command in the Dictionary toolkit · id ooa.dictionary/put · 5 inputs (2 required), 3 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
DictionaryDictionaryYesSource dictionary.
KeyStringYesKey to set; added when the dictionary does not have it yet, its value replaced when it does (keys are case-sensitive).
ValueAnyNoValue.
Only if missingBooleanNofalseKeep the existing value when the key is already there.
PositionNumberNoG1 (AA parity): where a new key goes, counted from 0 (0 = first); at the end when empty. A key already there keeps its place.

Outputs​

OutputTypeWhat it is
dictionaryDictionaryUpdated dictionary.
previousAnyThe value the key had before, empty when the key is new.
existedBooleanTrue when the key was already there.