EDITABLE CODE:
LiveDemo:jQuery - Looping over Object using $.each()
Note:It accepts a DOM node as a parameter.