Skip to content

Commit

Permalink
yet another jsonata fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit Riessen committed Oct 21, 2024
1 parent 514eba1 commit c82d510
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions red/deadred.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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":
Expand Down

0 comments on commit c82d510

Please sign in to comment.