diff --git a/red/api/editor/locales/en-US/jsonata.json b/red/api/editor/locales/en-US/jsonata.json index c839c759e..23917e749 100644 --- a/red/api/editor/locales/en-US/jsonata.json +++ b/red/api/editor/locales/en-US/jsonata.json @@ -189,11 +189,11 @@ "desc":"Returns an aggregated value derived from applying the `function` parameter successively to each value in `array` in combination with the result of the previous application of the function.\n\nThe function must accept two arguments, and behaves like an infix operator between each value within the `array`.\n\nThe optional `init` parameter is used as the initial value in the aggregation." }, "$flowContext": { - "args": "string", + "args": "string[, string]", "desc": "Retrieves a flow context property.\n\nThis is a Node-RED defined function." }, "$globalContext": { - "args": "string", + "args": "string[, string]", "desc": "Retrieves a global context property.\n\nThis is a Node-RED defined function." }, "$pad": { diff --git a/red/runtime/util.js b/red/runtime/util.js index d5643fcd5..d696f7f9a 100644 --- a/red/runtime/util.js +++ b/red/runtime/util.js @@ -389,11 +389,11 @@ function evaluateNodeProperty(value, type, node, msg, callback) { function prepareJSONataExpression(value,node) { var expr = jsonata(value); - expr.assign('flowContext',function(val) { - return node.context().flow.get(val); + expr.assign('flowContext',function(val, store) { + return node.context().flow.get(val, store); }); - expr.assign('globalContext',function(val) { - return node.context().global.get(val); + expr.assign('globalContext',function(val, store) { + return node.context().global.get(val, store); }); expr.assign('env', function(val) { return process.env[val];