ascending (i.e. direction).
Here is an example of a sort on a data source property.
Query a data source
Sort data source entries
A sort is a condition used to order the entries returned from a data source query.
A data source query can be sorted by a property and/or timestamp and in a given direction. For example, a library data source can be sorted by the “Name of a book” (i.e. property) and in
If you’re using the Notion SDK for JavaScript, you can apply this sorting property to your query like so:
Data source queries can also be sorted by two or more properties, which is formally called a nested sort. The sort object listed first in the nested sort list takes precedence.
Here is an example of a nested sort.
In this example, the data source query will first be sorted by “Food group” and the set with the same food group is then sorted by “Name”.