Extract display names
Take your time, follow the code and check your understanding.
The codeAPI transformations
Example checks
INPUT
[
{
"name": "Asha"
},
{
"name": "Ben"
}
]EXPECTED[ "Asha", "Ben" ]
INPUT
[]EXPECTED
[]
Your answer5 min · no timer
Implement solve(rows) and return a value. The example checks are visible. JavaScript runs in an isolated, network-blocked worker with a 2-second limit.
Show solution and explanation
map transforms each record into its name.
function solve(rows) {
return rows.map(row => row.name);
}