balena Interview Question

Flatten nested array