context put

FEEL built-in function · Context functions

context put(context, keys, value)

Returns a copy of the context with the entry set, added or replaced. A list of keys addresses a nested entry path.

Parameters

ParameterTypeDescription
contextcontextthe source context
keysstring or list of stringsentry name, or a path of names for nested contexts
valueanythe value to set

Examples

context put({x: 1}, "y", 2)
{x=1, y=2} Try it →
context put({x: {y: 1}}, ["x", "y"], 2)
{x={y=2}} Try it →

Related functions

context merge · get value

Defined by the OMG DMN 1.6 specification, chapter 10.3.4 (built-in functions).