Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For performance reasons, the Mapper does not make a copy of any arrays or objects written to the Target Path. If you write the same array or object to more than one target path and plan to modify the object, make the copy yourself. For example, given the array "$myarray" and the following mappings:

$myarray -> $MyArray
$myarray -> $OtherArray

Future changes to eitherĀ "$MyArray" or "$OtherArray" are in both arrays. So, make a copy of the array as shown below:

$myarray -> $MyArray [].concat($myarray) -> $OtherArray

This is true for objects, except you can make a copy using with the ".extend()" method as shown below:

$myobject -> $MyObject $myobject.extend({}) -> $OtherObject