Re: New Object from Object extraction

2018-03-18 Thread Felipe Nascimento de Moura
interesting. good to known there are proposals for that :) tks [ ]s *--* *Felipe N. Moura* Web Developer, Google Developer Expert , Founder of BrazilJS and Nasc . Website: http://felipenmoura.

Re: New Object from Object extraction

2018-03-18 Thread T.J. Crowder
On Sun, Mar 18, 2018 at 7:06 PM, Felipe Nascimento de Moura wrote: > So, let's say you want a new object containing only some of the properties > from another object. This has come up repeatedly, including very recently (most recent post today): https://esdiscuss.org/topic/expanding-object-shor

New Object from Object extraction

2018-03-18 Thread Felipe Nascimento de Moura
So, let's say you want a new object containing only some of the properties from another object. For example, if I have the Object1 like this: o1 = { a: 1, b: 2, c: 3, d: 4, e: 5 } And I want another object containing Object1's *b*, *c*, and *e*. I could: o2 = {...o1} // a full copy of