How to get Name/Value pairs while looping through JSON object (javascript)

burtonrhodes
burtonrhodes used Ask the Experts™
on
i can't seem to figure out how to get the "name" while walking through a json object tree.  I have a jsfiddle below that demonstrates the issue.  The "fieldErrors" object contains an array of name/value pairs and currently I can only display the "value".  How does one get the "name"?

http://jsfiddle.net/burtonrhodes/sCjNf/
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Multitechnician
Top Expert 2014
Commented:
check here : http://jsfiddle.net/sCjNf/1/

 $("#myConsole").append('fieldError Name:' + item).append("<br/>");

Author

Commented:
ugh...  i knew it was something extremely simple.  Thank you.
leakim971Multitechnician
Top Expert 2014

Commented:
You're welcome

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial