jq获取对象中的值

let mapList ={
		'榆林市':'/pc/%E7%9C%81%E5%B8%82%E5%8C%BA/assets/json/yulin.json',
		'延安市':'/pc/%E7%9C%81%E5%B8%82%E5%8C%BA/assets/json/yanan.json',
		'咸阳市':'/pc/%E7%9C%81%E5%B8%82%E5%8C%BA/assets/json/xianyang.json',
		'铜川市':'/pc/%E7%9C%81%E5%B8%82%E5%8C%BA/assets/json/tongchuan.json',
		'渭南市':'/pc/%E7%9C%81%E5%B8%82%E5%8C%BA/assets/json/weinan.json',
		'宝鸡市':'/pc/%E7%9C%81%E5%B8%82%E5%8C%BA/assets/json/baoji.json',
		'西安市':'/pc/%E7%9C%81%E5%B8%82%E5%8C%BA/assets/json/xian.json',
		'汉中市':'/pc/%E7%9C%81%E5%B8%82%E5%8C%BA/assets/json/hanzhong.json',
		'商洛市':'/pc/%E7%9C%81%E5%B8%82%E5%8C%BA/assets/json/shangluo.json',
		'安康市':'/pc/%E7%9C%81%E5%B8%82%E5%8C%BA/assets/json/ankang.json',
		}


json_url = mapList['咸阳市']
maps(json_url)//获取到的是咸阳市的值

你可能感兴趣的:(html+css,Javascript,前端,json,javascript,jquery)