See Sanity in action πŸ‘€ Join us for a live product demo + Q&A β†’

How to use a Query to Access Data in Array

3 replies
Last updated: Jan 17, 2023
Hi All, I am new here πŸ™‚ , I have got this schema, I need help with the query to access the data in the array
name: 'carousel',

type: 'document',

title: 'Carousel',







name: 'image',

type: 'image',




Jan 17, 2023, 10:35β€―AM
After you deploy, because deploying is far more easier than using your own PC's resources, just create a document of this Schematype and hit Crtl+Alt+I to show you the object properties you can use in groq queries to access the data inside your schematype., Let me know if that helps.
Jan 17, 2023, 10:52β€―AM
*[_type == "carousel"]{
"images": imgContainer[] -> {
"image": image.asset -> url
Jan 17, 2023, 10:58β€―AM
This just game an idea for my own project, thank you
Jan 17, 2023, 7:37β€―PM – build remarkable experiences at scale

Sanity is a customizable solution that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Categorized in