Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 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
和$.each
$.each
$.each(data, function(key, value){ console.log(value); });
尝试这个
$.each(data, function(key, value){ console.log(value.join('-')); });