From c82d51054fea6bfc18e4c6dc9cbaa99447491c12 Mon Sep 17 00:00:00 2001 From: Gerrit Riessen Date: Mon, 21 Oct 2024 11:27:30 +0200 Subject: [PATCH] yet another jsonata fix --- red/deadred.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/red/deadred.js b/red/deadred.js index 124121c..2d2d7d5 100644 --- a/red/deadred.js +++ b/red/deadred.js @@ -287,7 +287,7 @@ var DEADRED = (function() { msg[rle.p] = JSON.parse(rle.to) } if ( rle.pt == "msg" && rle.tot == "jsonata" ) { - msg[rle.p] = jsonata(rle.to.replace(/\$\$[.]/g,"$").replace(/msg[.]/g,"$")).evaluate({},msg) + msg[rle.p] = jsonata(rle.to.replace(/\$\$[.]/g,"$").replace(/msg[.]/g,"$")).evaluate(msg,msg) } if ( rle.pt == "msg" && rle.tot == "msg" ) { RED.utils.setMessageProperty( @@ -774,7 +774,7 @@ var DEADRED = (function() { break case "jsonata": - msg[prp.p] = jsonata(prp.v.replace(/\$\$[.]/g,"$").replace(/msg[.]/g,"$")).evaluate({},msg) + msg[prp.p] = jsonata(prp.v.replace(/\$\$[.]/g,"$").replace(/msg[.]/g,"$")).evaluate(msg,msg) break case "str":