产品有多种价格,因而显示的时候,自做聪明想着是这样子的, ${product.${priceType}} ,结果报错。html
正确的应该是这样子显示的:${poduct['${priceType}']} 。json
在html页面的js上,我也想着会不会和上面的相似,还真是被我猜中了 jsonString.list[i][priceType]。htm
在json对象中,能够用json.att,也能够用 json["att"],获取值。对象