I have a JSON object as such
{
"Data": [
{
"Iden": "12",
"Date": "01/23/2011",
"City": "Clearwater",
"State": "FL"
},
{
"Iden": "12",
"Date": "02/09/2012",
"City": "Elgin",
"State": "IL"
},
{
"Iden": "00010-LV01-12",
"Date": "06/22/2010",
"City": "Newport Beach",
"State": "CA"
}
]
}
As you can see, it has 3 rows and 4 columns. How do I use the .each in jquery to iterate through this object?
I tried:
$.each(Data, function () {
but it only did the first iteration
jQuery.each()can iterate over arrays, maps/objects, but the function parameters have slightly different meanings in each case:It is important to note that
thisis always in Object format, even if it is a string or number.Demo: http://jsfiddle.net/jtbowden/acySP/