bozzltron / node-json-transform

A node module for restructuring and performing operations on JSON on the fly.
172 stars 53 forks source link

Added option to set static key using $$ as prefix. #15

Open GovindMalviya opened 7 years ago

erichosick2 commented 6 years ago

I'm sure you've thought of this, but you can also use an operation to set a static value.

{
            run: function(val) {
                    return 'Some Static Value'; // ignore value
            }, on: 'some_item_name'
}

Something to consider instead of adding $$. It also might be a good idea to have the value of an item be a JPATH query. Not sure how $$ as a prefix may affect that. Something to consider.