2013-02-01 65 views
-2

我的JSON數據是像如何循環jQuery的JSON數據

{ 
    "Brand":["EM-03","TORRES"], 
    "Price":["5.00000","10.00000","15.00000"], 
    "Country":["US","SG"] 
} 

我想循環,JSON數據得到

Brand = 
    EM-03 - 
    TORRES 

Price = 
    5.00000 - 
    10.00000 - 
    15.00000 

Country = US - SG 
+5

[你有什麼試過](http://whathaveyoutried.com/)?或者我應該說:你有沒有試過*什麼*? –

回答

1

隨着$.each

$.each(data, function(key, value){ 
    console.log(value); 
}); 
0

試試這個

$.each(data, function(key, value){ 
    console.log(value.join('-')); 
});