Referencing an array key including a parenthesis in a test

How can I reference this array key directly in a test? sum(quantity)


I need to drill down 1 more into sum(quantity)

Json Response (partial)
“groups”: [
“by”: {},
“totals”: {
“sum(quantity)”: 411696

Special characters, so instead of using dot notation, you can do the following.

let groups = 
    "by": {},
    "totals": {
        "sum(quantity)": 411696


Groups is an array of objects, and totals is also an object. (An array is a special type of object).

1 Like