标签:
{ "10.10.11.1": { "target_1": "34.2", "target_3": "70.83", "target_2": "50.51", "target_5": "110.68", "c_event": "event", "target_4": "90.79", "c_timestamp": "12:54:34", "target_6": "10.2", "c_subject": "10.18.11.0" } }
{string,map<String,String>}类似这样的格式
js函数:
function getValue(){ var str = '{ "10.10.11.1": { "target_1": "34.2","target_3": "70.83","target_2": "50.51"}}'; var map = eval("("+str+")"); for (var key in map) { var a = map[key]; for (var k in a) { alert(k+'---'+a[k]); } } }
js解析json,js转换json成map,获取map的key,value
标签:
原文地址:http://www.cnblogs.com/bhlsheji/p/5325490.html