Skip to main content
JavascriptObjects

JavaScript: Object learnings

By August 7, 2021No Comments

Adding a property to a nested object

This is done via Lodash.

1
2
3
4
5
let self = this;

        self.items.map((element) => {
            return element.expanded = false;
        });

The above adds expanded property as false to all the rows or child objects.