Course lesson
Use GROQ `select` to Set Values Based on Conditions
GROQ's select function works kind of like a JavaScript switch statement. You give it some conditions and a default and it will assign the first condition that passes to the new field you've created.
- Duration
- 2 min
- Access
- Free
- Transcript
- Retained from source evidence
GROQ's select function works kind of like a JavaScript switch statement. You give it some conditions and a default and it will assign the first condition that passes to the new field you've created.