All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
3 answers
1k views

Access to an Array inside a Post Array with Sanity using next.js

I have an issue here trying to access a Post array that has inside a categories array. So if I console.log the data I see something like this: { posts: [ { _createdAt: '2021-10-23T05:02:...
theKid's user avatar
  • 592
1 vote
1 answer
713 views

Cannot read properties of undefined (reading 'current') I can't get slug from array

current page not displayed I can't get current slug from array stack: backend: Sanity Frontend: Astro.build Sanity import { defineField, defineType } from 'sanity' export default defineType({ ...
Create and Choose's user avatar
0 votes
1 answer
2k views

How do I turn a sanity io document field that is an array of objects to an array of strings

I have a recipes.js document that has a tag field: { name: 'tags', title: 'Tags', type: 'array', of: [{ type: 'reference', to: { type: 'tags' } }], options: { ...
André Jarboe II's user avatar
0 votes
0 answers
99 views

How do I render a blog post as an array instead of an object in a Nextjs/Sanity Studio Blog?

This is my error: Error: Objects are not valid as a React child (found: object with keys {_id, categories, title, _updatedAt, author, _createdAt, _rev, slug, _type}). If you meant to render a ...
solidwake's user avatar
0 votes
0 answers
209 views

What causes 'SyntaxError: Unexpected token u in JSON' when accessing Next.js admin at http://localhost:3000/admin?

I have been following a tutorial on YouTube (https://www.youtube.com/watch?v=OcTPaUfay5I) and I am currently at the 1:07:02 mark. The tutorial is about creating a web application using Next.js and ...
Mateo Ruiz's user avatar
0 votes
1 answer
909 views

Objects are not valid as a React child (found: object with keys {author})

this is my sanity schema called blogs and there is one refrence field called author so i am using blog.author to get author name on my blog getting error code in sanity blog.js { name: '...
keyur kasvala's user avatar
0 votes
1 answer
644 views

Looping through array within Sanity Io React

I'm using react with sanity io to create a portfolio page. I would like to create an unordered list according to how many tags I have a on a project. A project is composed of a title, image, ...
wayoh22's user avatar
  • 176
0 votes
1 answer
378 views

How do I map across a nested array of objects?

So my issue is this, I'm using Sanity.io to manage content in an illustrator's portfolio page. I'm trying to access an image gallery I've put into every project the illustrator has done. My data is ...
Jordan Kane's user avatar
0 votes
0 answers
823 views

How do I loop over an array within a map of a GraphQL

I'm trying to loop over data from Sanity using GraphQL. I've set up my .map to loop over the larger information and return an array of everything, which is working well; however, when it comes to the ...
Eric Phifer's user avatar
0 votes
1 answer
932 views

Can i merge/combine graphql API arrays into one?

Hey i'm using Sanity and have created both a allSanityPost (for my blog posts) and allSanityCases (for all my cases). Do anyone know how to combine these categories into one array and order them by ...
morgietalkie's user avatar