Ask Ben: Simple Recursion Example

Dump( obj ){
	If obj is simple (string, number, etc).
		Output value
 
	If obj is complex
		Output name
 
		For each attribute
			Dump( attribute )
 
	Return
}

For Cut-and-Paste