我想获得" text"的价值从下面的代码与JavaScript。任何帮助将不胜感激。
<script> require("InitialJSLoader").handleServerJS({
"require": [
["ODNavigation", "setPageQuery", [],
[{
"structure": [{
"text": "name",
"type": "none",
"uid": 00001
}],
"semantic": null
}]
]
]
});
</script>
&#13;
答案 0 :(得分:0)
r = {"require": [
["ODNavigation", "setPageQuery", [],
[{
"structure": [{
"text": "name",
"type": "none",
"uid": 00001
}],
"semantic": null
}]
]
]}
r.require[0][3][0].structure[0].text // return "name"
答案 1 :(得分:0)
var obj = {
"require": [
["ODNavigation", "setPageQuery", [],
[{
"structure": [{
"text": "name",
"type": "none",
"uid": 00001
}],
"semantic": null
}]
]
]
};
var text = obj.require[0][3][0].structure[0].text;
alert(text);
&#13;