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

Any future Future changes made to eitherĀ "$MyArray" or "$OtherArray" are in the both arrays. In that caseSo, 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 the ".extend()" method as shown below:

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