Pregunta de entrevista de Amazon

iterating a nested json, with recursive approach