Skip to content
Malexion edited this page Oct 31, 2016 · 1 revision

__.move(obj, key1, key2)

  • obj Array/Object to manipulate.
  • key1 Property name to move from.
  • key2 Property name to move to.

Examples

var newObj = __.move({ mykey: 1030 }, 'mykey', 'myresult');

console.log(newObj);

newObj = __.move([ 3, 2, 4, 5 ], 0, 2);

console.log(newObj);
Clone this wiki locally