GROQ is a query language for JSON. Just like SQL for databases or GraphQL, you construct a query, send it to a server, then the server returns only the data you requested. With GROQ, you expect to directly query JSON and the language will support many features to filter, projects, and construct the results exactly as you want.
Instructor: [0:00] GROQ is a query language for JSON objects, which means that you create a string that represents your query. You send that over to a server that has some JSON on it and then the server will take your query, run it against the JSON it has and send back only the values that you requested. These lessons are going to focus on GROQ as a query language.
[0:20] Instead of querying a server, we're just going to query a local object, like this PokeDex we have set up. There's no additional setup beyond running the script. As you're learning GROQ, make sure and check out the GROQ Arcade at groq.dev, which is a playground for GROQ where you can enter these queries and it'll respond instantly against the data found over here.
[0:42] It's a great environment with a few different examples you can load to play around with different data sets to better understand GROQ.
Member comments are a way for members to communicate, interact, and ask questions about a lesson.
The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io
Be on-Topic
Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.
Avoid meta-discussion
Code Problems?
Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context
Details and Context
Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!