How to read recursively an object which looks like that
问题 I have the following object: var xhr = JSON.parse('{"name1":{"errors":["This value should not be blank."]}, "children":{"name2":{"errors":["This value should not be blank."]},"message":[],"name3":{"errors":["This value should not be blank."]}, "children":{"name4":{"errors":["This value should not be blank."]} }}}'); console.log(xhr); I need to read recursively the xhr object. The object I posted is just an example, it means that the children could be more or less. Anywas objectReader should