python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
How do I query referenced document fields within an array of objects in Sanity with GROQ?
I have a document which has an array of objects of which one of the fields is a reference to another document. The following query returns the referenced document _id and _type only, and I need other ...
Anthony
Votes: 0
Answers: 1
How to filter Sanity.io dataset based on a field on references
How to get all posts by a category slug in GROQ?
You can see that a post is added to one or more categories. I would like to get all posts by a category slug to show the posts on a category page. I am...
Ben Jonson
Votes: 0
Answers: 1
Sanity.io GROQ: retrieve documents that have a key defined inside array of objects
I have documents that look like this
{
"_type": "celeb",
"name": "foo",
"facts: [
{a: 1, topics: {_ref: 'asd', _type: 'reference'}},
{a: 2},
...
M.K. Safi
Votes: 0
Answers: 1
How to compare arrays in GROQ
I have a blog with sanity CMS and I want to request related posts depending on corresponding tags from the current post which means I have to compare two arrays of tags.
My tags are described in post ...
Quentin C
Votes: 0
Answers: 1