---
schema_version: "1"
id: 54959c74a2727bd0c14a13a9feb37f98eca03f8cf75216643f9506c515616bd8
title: Rows.Retrieve
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-programmatic-content/ssjs_dataExtensionRowsRetrieve.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_dataExtensionRowsRetrieve.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 1c80f15741e46bb81f04e2df67201d7fbb21e2b2b62bfc5496933842441f87c9
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# Rows.Retrieve

## Overview

Retrieves up to 2500 rows of data in a data extension

### Syntax

Rows.Retrieve(1)

### Function Properties

<!--complex table-->

| Ordinal | Type   |     | Description                                      |
| ------- | ------ | --- | ------------------------------------------------ |
| **1**   | string |     | Specifies information to filter for the retrieve |

## Example

This sample code retrieves all data from the birthdayDE data extension.

```
var  birthdayDE = DataExtension.Init("birthdayDE");
var data = birthdayDE.Rows.Retrieve();
```

This sample code retrieves all data using a simple filter where the age is greater than 20.

```
var birthdayDE = DataExtension.Init("birthdayDE");
var filter = {Property:"Age",SimpleOperator:"greaterThan",Value:20};
var data = birthdayDE.Rows.Retrieve(filter);
```

This sample code retrieves all data using a complex filter where the age is greater than 20 and the first name is Angel.

```
var birthdayDE = DataExtension.Init("birthdayDE");
var complexfilter = {
                LeftOperand:{
                    Property:"Age",
                    SimpleOperator:"greaterThan",
                    Value:20
                },
                LogicalOperator:"AND",
                RightOperand:{
                    Property:"FirstName",
                    SimpleOperator:"equals",
                    Value:"Angel"
        }};
var moredata = birthdayDE.Rows.Retrieve(complexfilter);
```

This function returns information in an array of objects in JSON format:

```
[
    {
        "FirstName":"Angel",
        "LastName":"Angel",
        "EmailAddress":"aruiz@example.com",
        "Age":"25",
        "Birthday":"11/29/1985 12:00:00 AM"
    }
]
```

The Retrieve function can’t be used in the context of an email message or email preview.
