---
schema_version: "1"
id: 98986cb9bbec55522763a20e71685c4154381d498af349733f9c9a5f1bd9b8ea
title: Row()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/ampscript/references/data-extension/mc-ampscript-reference-data-extension-row.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-data-extension/mc-ampscript-reference-data-extension-row.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: efcc9dfcd88838a0252ad9d1fb6a8fdd0122475465c4658d92cb90ffc29c4035
products:
  - AMPscript for Marketing Cloud
  - Marketing Cloud
---
# Row()

Returns a row from a rowset, array, or object.

## Availability

<table>
  <tr>
    <td>Marketing Cloud Engagement</td>
    <td>✅ Yes</td>
  </tr>
  <tr>
    <td>Marketing Cloud Next</td>
    <td>✅ Yes</td>
  </tr>
</table>

This function became available in Marketing Cloud Next during the Summer ’26 release (API version 67.0).

## Syntax

```
Row(rowset, rowPosition)
```

The `Row()` function has two parameters:

- `rowset` (string): Required. The rowset, array, or object to return a row from.
- `rowPosition` (string): Required. The row number to return. The first row is row 1.

## Usage

To use the function, pass it a rowset, and the row number that you want to return. This example sets the value of `@row` to the first row of the rowset contained in the @rowset variable.

```
%%[
  Set @row = Row(@rowset, 1)
]%%
```

You can combine the `Row()` function with the `Field()` function to output a specific piece of data from the specified row. This example creates a rowset from JSON data. The `Row()` function retrieves the first row from the rowset. The `Field()` function retrieves the value of the "Price" attribute from the first row.

```
%%[
  Set @json = '
  {
    "Flights": [
      {
        "Origin": "IND",
        "Dest": "NYC",
        "Price": 100.0,
        "PerBagSurcharge": "N/A"
      },
      {
        "Origin": "IND",
        "Dest": "LAX",
        "Price": 200.0,
        "PerBagSurcharge": "Free"
      },
      {
        "Origin": "IND",
        "Dest": "SEA",
        "Price": 500.0,
        "PerBagSurcharge": 25
      }
    ]
  }'
  Set @rowset = BuildRowsetFromJSON(@json, "$.['Flights'][*]", true)
  Set @row = Row(@rowset, 1)
  Set @field = Field(@row, "Price", 0)
  Output(v(@field))
]%%
```

The function outputs `100`.
