Skip to content

Commit 2e4a3a9

Browse files
author
Lukas von Blarer
authored
Updating documentation regarting queryConten().sort() descending sorting
1 parent 73741f3 commit 2e4a3a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/content/4.api/2.composables/1.query-content.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ const articles = await queryContent('articles')
6464

6565
// Sort by title ascending first then sort by category descending
6666
const articles = await queryContent('articles')
67-
.sort({ title: 1, category: 0 })
67+
.sort({ title: 1, category: -1 })
6868
.find()
6969
// OR
7070
const articles = await queryContent('articles')
7171
.sort({ title: 1 })
72-
.sort({ category: 0 })
72+
.sort({ category: -1 })
7373
.find()
7474

7575
// Sort by nested field

0 commit comments

Comments
 (0)