From ea2ed6bd4a6e75903848f6971ea5dac90cc13034 Mon Sep 17 00:00:00 2001 From: Hakim Bawa <43802542+bawahakim@users.noreply.github.com> Date: Wed, 18 Nov 2020 11:32:00 -0500 Subject: [PATCH 1/2] Update objects.md --- _includes/js/objects.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/_includes/js/objects.md b/_includes/js/objects.md index 37712b6d2..43980a6bd 100644 --- a/_includes/js/objects.md +++ b/_includes/js/objects.md @@ -249,6 +249,12 @@ var playerName = gameScore.get("playerName"); var cheatMode = gameScore.get("cheatMode"); ``` +Alternatively, the `attributes` property of the `Parse.Object` can be treated as a Javascript object, and even destructured. + +```javascript +var { score, playerName, cheatMode } = result.attributes; +``` + The four special reserved values are provided as properties and cannot be retrieved using the 'get' method nor modified with the 'set' method: ```javascript From 6509408806696e577f66400bb2a3b2d2c77263d2 Mon Sep 17 00:00:00 2001 From: Hakim Bawa <43802542+bawahakim@users.noreply.github.com> Date: Wed, 18 Nov 2020 15:58:44 -0500 Subject: [PATCH 2/2] Update objects.md --- _includes/js/objects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/js/objects.md b/_includes/js/objects.md index 43980a6bd..c8b9df703 100644 --- a/_includes/js/objects.md +++ b/_includes/js/objects.md @@ -252,7 +252,7 @@ var cheatMode = gameScore.get("cheatMode"); Alternatively, the `attributes` property of the `Parse.Object` can be treated as a Javascript object, and even destructured. ```javascript -var { score, playerName, cheatMode } = result.attributes; +const { score, playerName, cheatMode } = result.attributes; ``` The four special reserved values are provided as properties and cannot be retrieved using the 'get' method nor modified with the 'set' method: