We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
json-edit
1 parent f1689a9 commit 98d3e95Copy full SHA for 98d3e95
1 file changed
src/js/jsonpath.js
@@ -486,7 +486,10 @@ export class JSONPath {
486
if ( outcome ) { return k; }
487
}
488
#modifyVal(obj, key) {
489
- const { modify, rval } = this.#compiled;
+ let { modify, rval } = this.#compiled;
490
+ if ( typeof rval === 'string' ) {
491
+ rval = rval.replace('${now}', `${Date.now()}`);
492
+ }
493
switch ( modify ) {
494
case undefined:
495
obj[key] = rval;
0 commit comments