Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Updating documentation regarting queryConten().sort() descending sorting #1364

Merged
merged 1 commit into from Jul 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/content/4.api/2.composables/1.query-content.md
Expand Up @@ -64,12 +64,12 @@ const articles = await queryContent('articles')

// Sort by title ascending first then sort by category descending
const articles = await queryContent('articles')
.sort({ title: 1, category: 0 })
.sort({ title: 1, category: -1 })
.find()
// OR
const articles = await queryContent('articles')
.sort({ title: 1 })
.sort({ category: 0 })
.sort({ category: -1 })
.find()

// Sort by nested field
Expand Down