Retrieve array element from CosmosDB doc: position?

I have a document with the following structure:

{
    "VehicleDetailId": 1,
    "VehicleDetail": [
        {
            "Id": 1,
            "Make": "BMW"
        },
        {
            "Id": 1,
            "Model": "ABDS"
        },
        {
            "Id": 1,
            "Trim": "5.6L/ASMD"
        },
        {
            "Id": 1,
            "Year": 2008
        }
    ]
}

I want to retrieve a specific element from the VehicleDetail array. For example, the second element:

{
    "Id": 1,
    "Model": "ABDS"
}

or the third:

{
    "Id": 1,
    "Trim": "5.6L/ASMD"
}

How can I do this?

To retrieve a specific element from the VehicleDetail array, you can use the index of the element you want to retrieve. In this case, to retrieve the second element, you would use VehicleDetail[1], and to retrieve the third element, you would use VehicleDetail[2].

So the solution would be:

To retrieve the second element:

{
    "Id": 1,
    "Model": "ABDS"
}

You can use VehicleDetail[1].

To retrieve the third element:

{
    "Id": 1,
    "Trim": "5.6L/ASMD"
}

You can use VehicleDetail[2].