Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Array operations

Focus mode
Array operations - Amazon QuickSight

JSON expression language allows generic array manipulation for the following functions:

  • map – Applies a mapping function to each element of an array and returns a new array with the transformed values.

    For example, ["map", [1, 2, 3], ["*", ["item"], 2]] maps each element of the array [1, 2, 3] by multiplying it by 2.

  • filter – Filters an array based on a given condition and returns a new array containing only the elements that satisfy the condition

    For example, ["filter", [1, 2, 3, 4, 5], ["==", ["%", ["item"], 2], 0]] filters the array [1, 2, 3, 4, 5] to include only the even numbers.

  • reduce – Reduces an array to a single value by applying a reducer function to each element and accumulating the result.

    For example, ["reduce", [1, 2, 3, 4, 5], ["+", ["acc"], ["item"]], 0] reduces the array [1, 2, 3, 4, 5] to the sum of its elements.

  • get – Retrieves a value from an object or an array by specifying a key or index.

    For example, ["get", ["item"], "name"] retrieves the value of the "name" property from the current item.

  • unique – Given an array returns only unique items inside this array.

    For example, ["unique", [1, 2, 2]] returns [1, 2].

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.