object-path icon indicating copy to clipboard operation
object-path copied to clipboard

Transform properties

Open bartbutenaers opened this issue 4 years ago • 0 comments

Dear, Thanks for sharing this useful library!

I was wondering if it is somehow possible to transform object properties (from original value into a new value).

Something like this:

objectPath.set(obj, "a.j.0.f", function(originalValue) {
   var newValue = originalValue + 2;
   return newValue;
});

Kind regards, Bart

bartbutenaers avatar Nov 16 '21 17:11 bartbutenaers