Flatten Nested JSON
You're a headhunter. You've fetched a promising CV from your elite network, but the data is nested in a complex JSON structure. Time to extract the key fields into a flat format.
But wait... as you look closer, something seems off. The candidate's name is "RAAAAWRGWAWGGR"? The species is "WWWRRRAAAGH"? These aren't words, they're Wookiee growls! The candidate is Chewbacca, and his entire CV is written in Shyriiwook.
Don't panic. The API also provides a fieldsToTranslate array that you'll use later to translate everything. For now, just extract what you need.
What you'll practice:
- Using the Edit Fields (Set) node
- Accessing nested JSON properties with expressions
- Flattening data structures
Your Task
- 1Copy the exercise below
- 2Paste into your n8n editor (Ctrl+V)
- 3Solve it — use hints if you get stuck
- 4Check the solution when done
Extract the key CV fields into a flat structure, including the translation helper array.
- Start with the workflow from the previous challenge (already provided)
- Add an Edit Fields node after the HTTP Request
- Extract these fields:
namefromcandidate.namespeciesfromcandidate.specieshomeworldfromcandidate.homeworldagefromcandidate.agerolefromexperience[0].roleemployerfromexperience[0].employerskillsfromexperience[0].skills(keep as array)fieldsToTranslatefrom the root level (keep as array - this contains the growls you'll translate later!)
Expected output: A flat object with all 8 fields extracted.
Get the exercise workflow
Create a free account to copy exercises into your n8n editor.