You can transform an existing collection by applying transformations on the input collection's data or by selecting specific data, which results in a new collection containing entirely different data sets.

<Collection>.![<Projection Expression>] becomes a new collection.

For the following input data model, the table following the data model describes possible projections.

{
    "user": {
        "contacts": [
            {
                "info": "user01@test.com",
                "primary": false,
                "type": "email"
            },
            {
                "info": 9876512345,
                "primary": true,
                "type": "phone"
            },
            {
                "info": 9876511111,
                "primary": false,
                "type": "phone"
            }
        ]
    }
}
Projection Input Output

Transform to a list of contact types only

user.contacts.![type]

["email", "phone", "phone"]

Extract all primary info attributes

user.contacts.?[primary].![info]

[9876512345]

Extract the primary info attribute as a different object format

user.contacts.?[primary].![{'primaryContact': info}]

[{"primaryContact": 9876512345}]