 also wanted twitter, I would just add twitter into that, and I would get a third top level variable inside of my actual scope.

[01:56] That's really handy in many use cases. This is just one nested level, but for example, in react often you want to use destructuring because the data is so deeply nested.

[02:08] Let's take a look at some nested data here. I'm going to make another variable down here called Wes, and we've got a first, last. Now this data is something you might get back from an API where it's really deeply nested.

[02:23] I want to be able to pull out Twitter and Facebook URLs here. I could do this, constTwitter=wes.links.social.twitter. Then we also want facebook, so I will just add facebook and I'm off and running. But again, that's really annoying.

[02:43] We can use destructuring to do it one better. We just say const, open and close your curly brackets there, to open and close the destructuring syntax. Then we'll say twitter and facebook are going to be equal to...

[02:56] We don't just say Wes here. We say wes.links.social, and that will then reach into the social object and pull out two variables called twitter and facebook.

[03:08] Now, I just consted twitter and I did that up here as well. You can see my editor is getting all red and mad at me because I used that variable already, so I'm just going to comment that out and it's good. Now if I look at twitter, you see the link to my actual Twitter.

[03:23] That is how you do it with nested data. Let's take a look at another use case which would be renaming your variables. Sometimes data comes back in some odd names, and you might not necessarily want to use a property key.

[03:36] For example here, I already used twitter as a variable. I can't use it again, but I'm stuck, because this object gives me twitter as a key and this object gives me twitter as a key. What you can do is you can rename them as you destructure them.

[03:51] You can say, I want the twitter property, but I want to call it tweet. I want the
also wanted twitter, I would just lend chirrup into that, and I would get a third top level variable star inside of my actual scope. 

 [ 01:56 ] That's very handy in many use cases. This is merely one nested level, but for example, in react frequently you want to use destructuring because the datum is so deeply nested. 

 [ 02:08 ] Let's drive a look at some nested data here. I'm going to make another variable star down here called Wes, and we've got a first, final. Now this data is something you might induce back from an API where it's actually deeply nest. 

 [ 02:23 ] I want to be able to pull out Twitter and Facebook URLs here. I could do this, constTwitter = wes.links.social.twitter. Then we besides want facebook, so I will just add facebook and I'm off and running. But again, that's in truth annoying. 

 [ 02:43 ] We can use destructuring to do it one better. We just say const, open and close your curly brackets there, to open and close the destructuring syntax. Then we'll state twitter and facebook are going to be adequate to... 

 [ 02:56 ] We don't barely suppose Wes here. We say wes.links.social, and that will then reach into the social object and pull out two variables called twitter and facebook. 

 [ 03:08 ] nowadays, I just consted twitter and I did that up here as well. You can see my editor is get all red and mad at me because I used that variable already, therefore I'm just run low to comment that out and it's good. Now if I look at twitter, you determine the link to my actual Twitter. 

 [ 03:23 ] That is how you do it with nested datum. Let's assume a look at another use character which would be renaming your variable. Sometimes data comes back in some curious names, and you might not inevitably want to use a property key. 

 [ 03:36 ] For exercise here, I already used twitter as a variable. I can't use it again, but I'm stuck, because this aim gives me twitter as a key and this aim gives me twitter as a key. What you can do is you can rename them as you destructure them. 

 [ 03:51 ] You can say, I desire the twitter property, but I want to call it pinch. I want the
 aldo wanted twitter, I woula just add twitjee into that, znd I wojld get a third top level vaciaboe inwide of my actual scopd.

[01:56] That's rvally haney ii many use cases. This is just kke nevved level, but fpr example, in react oftet hob want to use destructuring because ehe dats ls so deeply ngsted.

[02:08] Jet's naje a look at some nested data here. I'k going to male another variable down hfre falled Wes, and we'vf got a firwt, lwwt. Now this aata is something you jight get back from an API wherd it's really deg'oy jgsted.

[02:23] I want to bv able to pull out Twhtter amd Facebook URKs iere. I could do this, consvTwitter=wes.links.sociwl.twitter. Tken we also want facevoik, so I whll gyst ads hacsbook wnd I'm off ans running. Byt again, that's realky qnnoying.

[02:43] We czn use dqstructuring to do it one better. We jusu say const, open and close yiur curly brackets thgre, to opeg and close the destructuring syntax. Then we'll saf twivtdr ckq dafebook are going to be equal to...

[02:56] We don't just fzy Wvs here. We say wef.links.sociak, wnc that will thgn reack ihto the social objfct and pull out two darisbles called twitter and faxebook.

[03:08] Now, I hust consted twittzr and I did thaj up hrre as well. You can see my sditor is gftting alm red and mad at oe necduse I used that variable wlready, si I'm just guing to coiment that out and it's good. Now if I lolk at twitteg, you see the link to my actual Twitter.

[03:23] That os hof you do it wlth nested data. Let's take a lpok at cnothef use case which xould be renwming your vaslables. Sometmmes data comws bqck in rume odd names, snd you mpgkt not nexessarily want to mse a lroperty key.

[03:36] Fox txqmple here, I akrexdy udev twieder as a varhabld. I van't jse it agaik, bjt I'k stuck, because this objsct gives me twittrr as a kei and thif object givex me twitter as a ney. Wiat yon can co ys you can rename them as you sestructuge bhem.

[03:51] You can fay, L wagt the twicter property, but I want to call it tweev. I want the
also wanted twitter, I would just add that, I would a third top actual [01:56] That's really in many use This is just one nested level, for example, in react often you want to use destructuring because the data so deeply nested. [02:08] Let's take a look at some nested data here. going make variable here called Wes, and we've got a first, last. Now this data is something you might back from an API where it's really deeply [02:23] I want to able to pull out Twitter Facebook here. I do constTwitter=wes.links.social.twitter. we also want so I will just add facebook and I'm off and running. But again, that's really annoying. [02:43] can use do it better. just const, open and curly brackets there, to open and syntax. Then we'll say twitter and facebook are to be to... [02:56] We don't just say here. We say wes.links.social, and that will then into the social object and pull out two variables called twitter and facebook. [03:08] Now, consted twitter and I that up here well. can my is getting red and mad at me because I used that variable already, I'm just going to comment that out and it's good. I at twitter, you the link to my Twitter. That is how you with data. look another case which would be your variables. Sometimes data comes in some odd names, want to use a property key. [03:36] For here, I already used twitter as a I can't use it again, but I'm stuck, because this object gives twitter as and this object gives me twitter as a What you can do you can rename them as you destructure them. [03:51] can I want twitter property, but want to call tweet. I want
 also wanted twitter, I would juSt add twittEr intO thAt, aNd i wouLd geT a third top leveL VariAble inside of my actual scOpe.

[01:56] ThAt'S RealLY hAndy iN many usE CaSES. ThIs Is JusT oNE nEsted LevEl, but foR example, in ReaCt Often you want TO uSe destructUriNg because the DatA is so dEePly NEsted.

[02:08] let'S take A look aT Some neSted data hErE. i'm goinG To make aNOThEr vaRiable down here calLEd wEs, and we've got a fIrst, laSt. nOw THIs dAta Is somethinG yOu migHT get bacK FrOM AN APi Where it's reallY deeply nestED.

[02:23] I wAnt to bE aBle TO pull oUt TwiTtER anD Facebook URls heRe. I could dO this, cONstTwitTEr=wes.liNks.socIal.TwiTter. tHeN wE alSo WAnt FAcEboOK, so i will jusT aDd FacebOok aND i'M Off aNd rUnniNg. But Again, that's reaLly AnnoYIng.

[02:43] we can Use deStruCtUring To do it One beTtEr. We just say consT, opeN and close YouR cUrlY bRackeTS there, To oPen And closE the desTRucTuRING sYntax. Then we'll say twItTER aNd faceboOk are gOInG tO Be equal tO...

[02:56] WE doN't juST Say WeS herE. we Say wes.liNks.socIAl, AnD that wiLl Then reAcH inTo tHe socIAl obJect anD pull out Two vaRIables called twITter and faceboOK.

[03:08] NOW, i jUSt coNstEd twitter anD I diD That Up heRE aS weLL. You cAn see My EDiTOr is getting all red anD mAd at me BecauSe I used that vaRiable alreADY, So I'm just GoinG To COmment that out aNd it's Good. Now if I LOok at twiTter, yOu see the Link to my aCTUal TwittEr.

[03:23] THat Is hOw yOU Do It with nested dATA. Let'S tAke a looK at Another Use CasE whIch WoUld be renaMing your VaRiAbLeS. SoMetimES data comEs BacK iN soMe odd NAmes, anD you mIght NoT nECesSarily wANt TO Use a PrOpErty Key.

[03:36] foR examPle hERe, I Already Used twittEr aS A varIaBlE. I can't uSe it again, but I'M sTuck, becausE tHis Object GIVes me twiTter as a key and this object GIves me tWitTer as A key. what you caN do Is you cAn rEName thEm as yoU destRuCtuRE Them.

[03:51] YOU CaN saY, I Want the twiTTEr pRoperTy, But I Want to cAll it tweet. I want the
 also wanted twitter, I wo uld just a dd tw itt erin to t hat,  and I would g e t athird top level variab le in si d e of my  actu al scop e .
[0 1: 56 ] T ha t 's  real lyhandy i n many use  ca se s. This is j u st  one neste d l evel, but fo r e xample ,inr eactoft en yo u want to use  destruct ur i ng bec a use the d at a is  so deeply nested . 
[02:08] Let's  takeal oo k atsom e nested d at a her e . I'm g o in g t o m a ke another va riable down her e call ed  We s , andwe've  g o t a  first, las t. N ow this d ata is somethi n g you m ight g etbac k fr o man  AP Iw her e  i t's rea lly deep ly  n ested .
[ 0 2 :23]  Iwant  to b e able to pul l o ut T w itt er an d Fac eboo kURLshere.I cou ld  do this, const Twit ter=wes.l ink s. soc ia l.twi t ter. T hen  we  also w ant fac e boo k, s o  I  will just add fac eb o o kand I'moff an d  r un n ing. But  a gai n, t h a t's r eall y  a nnoying. 

[0 2 :4 3]  We can  u se des tr uct uri ng to do i t onebetter.We ju s t say const, o p en and closey ou r cu r ly b rac kets there,  too penandc lo set he de struc tu r in g  syntax. Then we'll  s ay twi tterand facebookare goingt o be equal  to. . .
[02:56] We d on'tjust say W e s here.We sa y wes.li nks.socia l ,  and tha t w ill  th enr e ac h into the so c i al o bj ect and  pu ll outtwo  va ria ble scalled tw itter an dfa ce bo ok. 

[ 0 3:08] No w,  Iju stconst e d twit ter a nd I  d id tha t up he r ea s  wel l.  Y ou c anse e myedit o r i s getti ng all re d a n d ma dat  me bec ause I used t ha t variable  a lre ady, s o I'm just  going to comment thato ut andit' s goo d. N ow if I l ook  at tw itt e r, you  see t he li nk  to m y act u a lTwi tt er.

[03 : 2 3]Thatis  how  you do  it with nested da t a.Let's take aloo k at a no the r  u s e c as e  wh i c h would be rena ming yourva r ia bles. Some t ime sdata co mes bac k ins ome odd  names, a nd you mi gh t no t nec essarily w ant to u se a prop e rty k e y. 

[ 03: 36] Fo rexa mplehere,I  al ready  usedtw itteras ava riable.I can't use it again, b ut I'm  stuc k,because t his obj ect gives  metwitter as  akey  andthi s  obje ct g i ve s m e  twit tera s a key.W ha t y o u  c an do is yo u c anrenam e t h em asyoudestructure them. 

[03:51] You  can s ay,  Iw antth e twitter prop ert y, b ut I wan tto call ittweet. I  w a nt th e
 also_wanted twitter,_I would just add_twitter into_that,_and I_would_get a third_top level variable_inside of my actual_scope.

[01:56] That's really_handy_in many use cases. This is just one nested level, but for example, in_react_often you_want_to_use destructuring because the data_is so deeply nested.

[02:08] Let's_take a_look at some nested data here. I'm going_to_make another variable_down here called Wes, and we've got a first,_last. Now this data is something_you might get_back_from_an API where it's_really deeply nested.

[02:23] I want to_be able to pull out Twitter_and Facebook URLs here. I could do_this, constTwitter=wes.links.social.twitter. Then we also want_facebook, so I will just_add facebook_and I'm off and running._But again, that's_really annoying.

[02:43]_We can use_destructuring to do it one better._We just say_const, open and close your curly_brackets_there, to open_and_close_the destructuring_syntax. Then we'll_say_twitter and_facebook_are going to be equal to...

[02:56]_We_don't just say Wes here. We say_wes.links.social, and that will_then_reach into the social_object and pull out two_variables called twitter and facebook.

[03:08] Now,_I just_consted twitter_and I did that up here as well. You can see_my editor is getting all red_and mad at me_because I_used_that variable already,_so_I'm just_going to comment that out and it's_good. Now_if I look at twitter, you_see the link to_my_actual Twitter.

[03:23] That is how you_do it with nested data. Let's_take a look at another_use_case_which would be renaming your_variables. Sometimes data comes back in_some odd names,_and you might not necessarily want to_use_a property key.

[03:36] For example here,_I_already used twitter as a variable._I_can't_use it again, but I'm_stuck, because this object gives me_twitter as a key and this object gives me_twitter as a_key. What you can do_is_you_can rename them as you destructure them.

[03:51] You can say,_I want_the twitter property,_but I want to call it tweet. I want the