Writing an API, I would to generate an enum from a nested object
const ROUTES = { USERS: \'/users\', AUTH: { LOGIN: \'login\', TEST: { level