Hi.
I am trying to get an object out of another object, with only a few of its
properties.
I know we can do this:
let { a, c } = { a: 1, b: 2, c: 3 }
In this case, we have a variable 'a' and a variable 'c'.
What I want is { a: 1, c: 3}
Is there a way to do it? Something like:
let { a, c } as X = { a: 1, b: 2, c: 3 }
and then, have the variable X with an object { a: 1, c: 3}
Is there a way to do that? If now...would it make sense to become a
proposal?
Thanks.
[ ]s
*--*
*Felipe N. Moura*
Web Developer, Google Developer Expert
<https://developers.google.com/experts/people/felipe-moura>, Founder of
BrazilJS <https://braziljs.org/> and Nasc <http://nasc.io/>.
Website: http://felipenmoura.com / http://nasc.io/
Twitter: @felipenmoura <http://twitter.com/felipenmoura>
Facebook: http://fb.com/felipenmoura
LinkedIn: http://goo.gl/qGmq
---------------------------------
*Changing the world* is the least I expect from myself!
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss