Recursive iteration over an object in Jade template?
问题 I have an object of mixed type properties - some strings, some arrays of strings, some objects containing arrays of strings - that can potentially go many levels deep. I would like to iterate over all properties so that an object creates a div, an array creates a div, and a string property creates a span to contain the text. { "string" : "some text", "object" : { "array" : [ "text" ] } } The above object would render as: <span>some text</span> <div> <div> <span>text</span> </div> </div> But