top of page

Map & Reduce

In many cases I had to filter and modify arrays myself and sometimes join them together to a string.

Input:

[{"First name": "Henrik", "Last name": "Foo"}, {"First name": "Moritz", "Last name": "doo"}]

JS-Code:

return input.filter( i => i['Last name']).map(i => `${i['First name']} ${i['Last name']}`).join('; ');

Output:

{ output: 'Henrik Foo; Moritz doo' }

Screenshot 2022-09-12 at 20.21.14.png
bottom of page