Flatten object & Promise.all | TikTok Interview Question