<script runat="server" language="javascript">
function getJsonObj(json) {
eval("var o="+json);
return o;
}
function getJsonItem(obj,i)
{
return obj[i];
}
</script>
<%
jsonStr="{abc:1,bcd:{x:1},der:[{y:1},{y:2}]}"
set a=getJsonObj(jsonStr)
response.write "a.abc="&a.abc&"<br>"
response.write "a.bcd.x="&a.bcd.x&"<br>"
set b=getJsonItem(a.der,1)
response.write "b.y="&b.y
%>
原创文章,转载请注明来源:www.aspbc.com,谢谢。