loading...

YPSKA #11 GROQ

github logo ・1 min read

You should probably know about... (17 Part Series)

1) YSPKA #1: Pulumi 2) You should probably know about... 3 ... 15 3) YSPKA #2: gRPC 4) YSPKA #3: Dapr 5) YSPKA #4: Plop JS 6) YPSKA #5 Next.js 7) YPSKA #7 Static site generators 8) YPSKA #8 Headless CMS 9) YPSKA #9 Svelte 10) YPSKA #10 Runtypes 11) YPSKA #11 GROQ 12) YPSKA #12 Immer 13) YPSKA #13 Rollup 14) YPSKA #14 Pupeteer 15) YPSKA #15 Curl 16) YPSKA #15 Taking a break 17) YPSKA #16 lit-html

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.

twitter logo DISCUSS
Classic DEV Post from Jul 30 '19

What's your favorite question to be asked?

Håkan Fahlstedt profile image
Senior fullstack developer that loves technology and sharing knowledge.

Sore eyes?

dev.to now has dark mode.

Go to the "misc" section of your settings and select night theme ❤️