00:23 If we console.log this secondary value out, we get triceps. We can destructure as many levels deep as we need to. If we only wanted this primary value, we could come down here, and we could say, const variations, and we could destructure the standard.
00:43 Then we could destructure muscles and finally grab the primary value out of there. Don't forget to set it equal to the top level object, which is bench press. Then we will console.log primary, and we have chest, which is what we were expecting.
01:04 Now, there are a couple of caveats here. First off, we can get a hard to read if you destructure too many levels deep. Keep that in mind when using this feature. Secondly, the values you are trying to destructure may not always exist.
01:18 Maybe you're trying to get some data from an API. For some reason, it doesn't come back the way you were expecting. In this case, we may want to set a default value for primary just in case it doesn't exist.
01:29 We could say primary equals unknown. That way, if we come up here and all of a sudden this primary value does not exist, we still get a value of unknown rather than throwing an error.