HomeChallengesRepsProblemsLeaderboardTake a challenge

API Data Transformation

Turn the rows an API actually returns into the shape your table wants to render.

Intermediate12 min on the clock6 graded checks · 100 pointsJavaScript + TypeScript
Graded by running your code against real cases.

What you build

  • Declare a UserRow type: id, fullName, email, status
  • status is the literal union "Active" | "Inactive", not a boolean
  • toUserRows(rows) maps the API shape onto it
  • first_name and last_name become one fullName
  • An empty list in gives an empty list out

Done means

toUserRows turns the API rows into exactly the UI shape, with no snake_case left.

How it is graded

Published in full, before you start — every point is one of these and there is nothing else. Each one runs your code; it is not a search for keywords.

  1. Every row is transformed+15Reshaping API data
  2. first_name and last_name become fullName+20Reshaping API data
  3. is_active becomes "Active" or "Inactive"+20Reshaping API data
  4. No snake_case survives the transform+15Reshaping API data
  5. An empty list gives an empty list+10Reshaping API data
  6. UserRow is declared with a literal status union+20TypeScript basics

What it teaches

The rest of JavaScript + TypeScript