json格式如下:
[{"datetime":"2012-11-16","content":"INFORMATION RECEIVED (This is not an acknowledgment of the physical receipt of the stated Registered Article)","location":""},
{"datetime":"2012-11-17","content":"Despatched to overseas (Country code: SE)","location":""},{
"datetime":"2012-11-17","content":"Despatched to overseas (Country code: SE)","location":""},
{"datetime":"2012-11-20","content":"Arrived at overseas (Country code: SE)","location":""},
{"datetime":"2012-11-20","content":"Arrived at overseas (Country code: SE)","location":""},
{"datetime":"2012-11-26","content":"Attempted Delivery (Country code: SE)","location":""},
{"datetime":"2012-11-29","content":"Product Delivered (Country code: SE)","location":""}]
但是打印出来却是这样子的:
0 2012-11-16 INFORMATION RECEIVED (This is not an acknowledgment of the physical receipt of the stated Registered Article)
1 2012-11-17 Despatched to overseas (Country code: SE)
2 2012-11-17 Despatched to overseas (Country code: SE)
3 2012-11-20 Arrived at overseas (Country code: SE)
4 2012-11-20 Arrived at overseas (Country code: SE)
5 2012-11-26 Attempted Delivery (Country code: SE)
6 2012-11-29 Product Delivered (Country code: SE)
each undefined undefined undefined
eachSlice undefined undefined undefined
all undefined undefined undefined
any undefined undefined undefined
collect undefined undefined undefined
detect undefined undefined undefined
findAll undefined undefined undefined
select undefined undefined undefined
grep undefined undefined undefined
include undefined undefined undefined
member undefined undefined undefined
inGroupsOf undefined undefined undefined
inject undefined undefined undefined
invoke undefined undefined undefined
max undefined undefined undefined
min undefined undefined undefined
partition undefined undefined undefined
pluck undefined undefined undefined
reject undefined undefined undefined
sortBy undefined undefined undefined
toArray undefined undefined undefined
entries undefined undefined undefined
zip undefined undefined undefined
size undefined undefined undefined
inspect undefined undefined undefined
find undefined undefined undefined
_reverse undefined undefined undefined
_each undefined undefined undefined
clear undefined undefined undefined
first undefined undefined undefined
last undefined undefined undefined
compact undefined undefined undefined
flatten undefined undefined undefined
without undefined undefined undefined
uniq undefined undefined undefined
intersect undefined undefined undefined
clone undefined undefined undefined
不明白这些undefined是从哪来的
我读取JSON的代码是
var data = eval("("+tracking+")");
var strData = "";