Adobe Interview Question

traverse a given json object in different ways (ex bfs,dfs,etc)