Vidoori interview question

flatten a nested array of objects and strings.