FareHarbor interview question

How do you flatten a JavaScript object?