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

transform operation: include unmapped fields in target objet

Open cdelgadob opened this issue 6 years ago • 0 comments

It would be useful to find a way to copy the fields not present in the recipe object to the target object.

This way, if I have an object with 20 properties and I need to change only 5, I can make a recipe with only five entries.

This could be achieved with five move operations, but it's not that powerful.

An extra parameter in the transform function of maybe a final wildcard in the recipe could do the job, something like

const recipe = {
'p_key': 'email',
's_key': 'name',
'*': '*'};

cdelgadob avatar Dec 12 '19 12:12 cdelgadob