Extract and Shape the CV Data

Decode Chewbacca's CV - Challenge 2 of 6
Difficulty
1/10
Tags
EssentialsHTTP RequestEdit Fields (Set)ExpressionsJSON

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

  1. 1Copy the exercise below
  2. 2Paste into your n8n editor (Ctrl+V)
  3. 3Solve it — use hints if you get stuck
  4. 4Check the solution when done

Extract the key CV fields into a flat structure, including the translation helper array.

  1. Start with the workflow from the previous challenge (already provided)
  2. Add an Edit Fields node after the HTTP Request
  3. Extract these fields:
    • name from candidate.name
    • species from candidate.species
    • homeworld from candidate.homeworld
    • age from candidate.age
    • role from experience[0].role
    • employer from experience[0].employer
    • skills from experience[0].skills (keep as array)
    • fieldsToTranslate from the root level (keep as array - this contains the growls you'll translate later!)

Expected output: A flat object with all 8 fields extracted.

Hints

  1. Add an Edit Fields (Set) node after the HTTP Request
  2. For each field, use expressions to access nested data:
    • Name: {{ $json.candidate.name }}
    • Species: {{ $json.candidate.species }}
    • Homeworld: {{ $json.candidate.homeworld }}
    • Age: {{ $json.candidate.age }}
    • Role: {{ $json.experience[0].role }}
    • Employer: {{ $json.experience[0].employer }}
    • Skills: {{ $json.experience[0].skills }}
    • Fields to Translate: {{ $json.fieldsToTranslate }}
  3. Set the appropriate type for each field (string for most, array for skills and fieldsToTranslate)
  4. Make sure "Include Other Input Fields" is OFF to get a clean output

Explanation

Why we extract and flatten data:

API responses often contain more data than we need, nested in complex structures. By extracting only the fields we care about, we:

  • Simplify downstream processing
  • Make the data easier to work with
  • Remove unnecessary noise

How expressions work:

In n8n, expressions let you reference data from previous nodes using $json:

  • $json.candidate.name - accesses the name property inside candidate
  • $json.experience[0] - accesses the first item in the experience array
  • $json.experience[0].skills - accesses the skills array from the first experience

The Edit Fields node:

This node (also called "Set") lets you create new fields with values from expressions, rename fields, or keep only specific fields. It's one of the most commonly used nodes for data transformation.

About fieldsToTranslate:

The API helpfully provides a fieldsToTranslate array containing each Wookiee growl that needs translation. Each item has a field name (like "name", "species") and a value (the growl to translate). In the next challenge, you'll split this array into separate items so you can translate each one.

Copy the Solution

Paste into n8n with Ctrl+V to compare with your approach.

Login to see the exercise

Create an account to access challenges and track your progress.

Log in to see exercise
Step 2 of 6

Next up

Prepare CV Data for Translation

Related Content

Continue your learning journey with these related challenges and guides: