---
title: "Discussion on \"JavaScript object destructuring tips\" | Hashnode"
description: "Discussion on \"JavaScript object destructuring tips\". Regarding JavaScript, we get an extremely useful way of extracting properties from objects.\n\nNote: Destructuring also works on arrays, but let's focus on objects for this one\n\nLet's say we have a user object and want to extract the properties of indi..."
url: "https://hashnode.com/posts/javascript-object-destructuring-tips/62dce41b0da9857574b22bee"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [JavaScript object destructuring tips](https://h.daily-dev-tips.com/javascript-object-destructuring-tips?utm_source=hashnode&utm_medium=feed)

Regarding JavaScript, we get an extremely useful way of extracting properties from objects. Note: Destructuring also works on arrays, but let's focus on objects for this one Let's say we have a user object and want to extract the properties of indi...

Jul 24, 2022 · 4 min read · h.daily-dev-tips.com  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#web-development](https://hashnode.com/tag/web-development)

## Written by

[Chris Bongers](https://hashnode.com/@dailydevtips)

@dailydevtips · Cape Town, SA

  
[View profile](https://hashnode.com/@dailydevtips)

Looking to get into development? As a full-stack developer I guide you on this journey and give you bite sized tips every single day 👊

I'm a full-stack developer from South Africa 🇿🇦. I love writing about JavaScript, HTML and CSS.

## Responses 6

Markdown supported · ⌘↵ to post

[Birdger Tower](https://hashnode.com/@B98)

[Oct 2, 2022](https://hashnode.com/posts/javascript-object-destructuring-tips/62dce41b0da9857574b22bee/comment/6339fca7fa20fa4bc8e5915f)

Thanks for sharing! Very helpful.

[Chris Bongers](https://hashnode.com/@dailydevtips)

[Oct 3, 2022](https://hashnode.com/posts/javascript-object-destructuring-tips/62dce41b0da9857574b22bee/comment/6339fca7fa20fa4bc8e5915f#reply-633a7cadfa20fa4bc8e598ce)

Happy to hear you enjoyed it 🙏

[Shaik Mohammad Abdullah](https://hashnode.com/@ShaikMoAbdullah)

[Aug 2, 2022](https://hashnode.com/posts/javascript-object-destructuring-tips/62dce41b0da9857574b22bee/comment/62e8cf053f084d032011c511)

Hey [Chris Bongers](https://hashnode.com/@dailydevtips), I did not understand the dynamic name destructuring.

[Chris Bongers](https://hashnode.com/@dailydevtips)

[Aug 2, 2022](https://hashnode.com/posts/javascript-object-destructuring-tips/62dce41b0da9857574b22bee/comment/62e8cf053f084d032011c511#reply-62e8e0173f084d032011c8ad)

It basically is a way to use variables as the key selector.

In the example we might get getProperty from a function (like a select list)

So we can't do { name } as we don't know if it's name or age for instance. This way you can use a dynamic name (variable) to be the destructure selector.

Hope that makes a some sense?

[Shaik Mohammad Abdullah](https://hashnode.com/@ShaikMoAbdullah)

[Aug 2, 2022](https://hashnode.com/posts/javascript-object-destructuring-tips/62dce41b0da9857574b22bee/comment/62e8cf053f084d032011c511#reply-62e965b092b7fd0a78c33e02)

Okay [Chris Bongers](https://hashnode.com/@dailydevtips). It's similar to Destructuring with a different name. We are storing the name with a different variable and using that variable to get another variable which will be used to get the value "Chris".

It took longer to understand. But, I hope my explanation makes sense :)

[Devendra Gaud](https://hashnode.com/@Dev-Gaud)

[Aug 2, 2022](https://hashnode.com/posts/javascript-object-destructuring-tips/62dce41b0da9857574b22bee/comment/62e8a1d0430bd1d04a848c8b)

Thanx learned so much 💖.

[Chris Bongers](https://hashnode.com/@dailydevtips)

[Aug 2, 2022](https://hashnode.com/posts/javascript-object-destructuring-tips/62dce41b0da9857574b22bee/comment/62e8a1d0430bd1d04a848c8b#reply-62e8dfb23f084d032011c87e)

This is great, so happy to hear that 💖

[liugezhou](https://hashnode.com/@liugezhou)

[Jul 31, 2022](https://hashnode.com/posts/javascript-object-destructuring-tips/62dce41b0da9857574b22bee/comment/62e6630f053e6bd578426807)

Cool

[Chris Bongers](https://hashnode.com/@dailydevtips)

[Aug 1, 2022](https://hashnode.com/posts/javascript-object-destructuring-tips/62dce41b0da9857574b22bee/comment/62e6630f053e6bd578426807#reply-62e770c2053e6bd578428e18)

Glad you enjoyed it 🙏

[Isabel Nava](https://hashnode.com/@isabelnava)

[Jul 28, 2022](https://hashnode.com/posts/javascript-object-destructuring-tips/62dce41b0da9857574b22bee/comment/62e2a1c9d7b405bea1558062)

I really enjoyed the 'PLAY THIS ARTICLE' function but what would make it even better if it had a fixed position so I could pause without scrolling back to the top (and having to rush to find my place when I press play.) Very helpful article.

[Chris Bongers](https://hashnode.com/@dailydevtips)

[Jul 29, 2022](https://hashnode.com/posts/javascript-object-destructuring-tips/62dce41b0da9857574b22bee/comment/62e2a1c9d7b405bea1558062#reply-62e38bfed7b405bea155a273)

That's actually a hashnode feature, will tag [Syed Fazle Rahman](https://hashnode.com/@fazlerocks) for reference. 💖

[Syed Fazle Rahman](https://hashnode.com/@fazlerocks)

[Jul 29, 2022](https://hashnode.com/posts/javascript-object-destructuring-tips/62dce41b0da9857574b22bee/comment/62e2a1c9d7b405bea1558062#reply-62e38c6ad7b405bea155a2b5)

Thanks for tagging, Chris.

That's a great suggestion, [Isabel Nava](https://hashnode.com/@isabelnava). We're already working on an upgrade to the listen feature. It'll be shipped soon.

[Shaik Mohammad Abdullah](https://hashnode.com/@ShaikMoAbdullah)

[Aug 2, 2022](https://hashnode.com/posts/javascript-object-destructuring-tips/62dce41b0da9857574b22bee/comment/62e2a1c9d7b405bea1558062#reply-62e8ce608f1d6b0345551daa)

Amazing [Syed Fazle Rahman](https://hashnode.com/@fazlerocks)

[Micheal Ogundero](https://hashnode.com/@Mikolo)

[Jul 27, 2022](https://hashnode.com/posts/javascript-object-destructuring-tips/62dce41b0da9857574b22bee/comment/62e142cd7d685aae7f94f3d4)

Love this!

[Chris Bongers](https://hashnode.com/@dailydevtips)

[Jul 28, 2022](https://hashnode.com/posts/javascript-object-destructuring-tips/62dce41b0da9857574b22bee/comment/62e142cd7d685aae7f94f3d4#reply-62e2237ed15a9fb24e515947)

Glad to hear you like the article 💖
