daily pastebin goal
68%
SHARE
TWEET

Untitled

a guest Aug 10th, 2018 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. change property name
  2. var a = { Prop1: 'test', Prop2: 'test2' }
  3.    
  4. for(var p in r) p.propertyName = 'Prop3';
  5.    
  6. a.Prop3 = a.Prop1;
  7. delete a.Prop1;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top