For the complete documentation index, see llms.txt. This page is also available as Markdown.

Sort transform action

Use case

You are listing users from Microsoft Graph and you would like to sort the result alphabetically based on their displayName attribute.

Overview

Given an iterable, return a new sorted list from the items in the iterable.

Parameters

Parameter
Description
Required

Attribute

When sorting a list of dictionaries, an attribute or key to sort by. Can use dot notation like "address.city".

Case Sensitive

When sorting strings, sort upper and lower case separately.

Input List or String

List or string to sort

Reverse Sort

If true, will sort in descending order instead of the ascending order.

For nested field names, separate them by dots (e.g., details.age).

Usage

Example 1: Sort Users By ID

Inputs:

Attribute: age

Case Sensitive: false

Input List or String:

[
	{
		"id": 6,
		"name": "Dan6",
		"favorite_letter": "a"
	},
	{
		"id": 2,
		"name": "Dan2",
		"favorite_letter": "c"
	},
	{
		"id": 4,
		"name": "Dan4",
		"favorite_letter": "g"
	},
	{
		"id": 1,
		"name": "Dan1",
		"favorite_letter": "B"
	},
	{
		"id": 3,
		"name": "Dan3",
		"favorite_letter": "z"
	},
	{
		"id": 5,
		"name": "Dan5",
		"favorite_letter": "A"
	}
]

Reverse Sort: false

Example 2: Sort A List of Numbers

Inputs:

Attribute: age

Case Sensitive: false

Input List or String:

Reverse Sort: false

Results output

Results of example 1:

Results of example 2:

Last updated

Was this helpful?