mariocasciaro/object-path

Transform properties

bartbutenaers opened this issue · 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