Vidoori Interview Question

flatten a nested array of objects and strings.