Skip to main content

values

Returns a list of all values in a JSON or ATL object.

Parameters

  • OBJECT (object)

    A JSON or ATL object.

Examples

Assume a "Describe a JSON Object" project with this data:

{
    "finances": {
        "Q1": [
            {"branch": "Austin", "sales": 2454994.45, "target": 2000000},
            {"branch": "Boston", "sales": 3485915.31, "target": 3500000},
            {"branch": "Dallas", "value": 2657920.15, "target": 2750000},
            {"branch": "Denver", "sales": 2148275.64, "target": 2000000}
        ]
    }
}

The "Q1" array contains four JSON objects. Zero-based indexing applies, so the objects are indexed 0-3.

ATL in Script

Result

[[values(WholeJSON.finances.Q1[0])]]

Austin, 2,454,994.45 and 2,000,000

[[values(WholeJSON.finances.Q1[1])]]

Boston, 3,485,915.31 and 3,500,000

The function also works on ATL objects.

ATL in Script

Result

[[

myObject = (product = 'Ointmo', Q1sales = 21624, Q2sales = 3071) 

values(myObject)

]]

Ointmo, 21,624 and 3,071