DEV Community

Håkan Fahlstedt
Håkan Fahlstedt

Posted on

YPSKA #11 GROQ

So, have you ever ended up debugging what the h*ll is returned from your REST service? A large chunk of JSON? You need to know if a field is set in one of all the records? What would you say about having a query language that you can run in the terminal for that JSON?

Have a look at GROQ. GROQ stands for Graph-Relational Object Queries, and is an open standard invented by Sanity, Inc. With GROQ you can write queries to find some specific data in your JSON-document. There's a nice introduction of GROQ here

So if you ever end up going through a large JSON document do

npm install -g groq-cli

instead.

Top comments (0)