> For the complete documentation index, see [llms.txt](https://javascriptuse.gitbook.io/advanced/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://javascriptuse.gitbook.io/advanced/javascript/mot-cach-dat-va-gan-gia-tri-trong-mang-object-cu-ngan-gon-ok.md).

# Một cách đặt và gán giá trị trong mảng, object cự ngắn gọn (ok)

```
var test = {
  "record": {
    "text1": {
      "value1": "45451"
    },
    "text2": {
      "value2": "45454"
    }
  }
}
const { record: { text1: {value1}, text2: {value2} } } = test;
console.log(value1);
console.log(value2);
```

Kết quả:

```
test.js:12 45451
test.js:13 45454
```
