我需要帮助!您能告诉我如何从javascript中获取信息吗? 我想从fisrt数组(121,73)和第四个(99,25)获得Third值。预先谢谢您!
{
"error": [],
"result": {
"XETHZEUR": [
[
1545955200,
"100.76",
"121.73",
"99.25",
"120.16",
"111.15",
"186385.05723331",
25420
],
[
1546041600,
"120.52",
"130.00",
"115.91",
"117.89",
"121.47",
"154551.36751227",
23261
],
"last": 1546387200
}
}
答案 0 :(得分:0)
var feild = {
"error": [],
"result": {
"XETHZEUR": [
[
1545955200,
"100.76",
"121.73",
"99.25",
"120.16",
"111.14",
"183581.25666187",
25053
],
[
1546041600,
"120.16",
"130.00",
"115.91",
"117.89",
"121.48",
"152980.08236398",
21309
],
[
1546128000,
"117.96",
"123.75",
"112.78",
"121.99",
"119.43",
"108719.51659796",
14936
],
[
1546214400,
"121.99",
"122.30",
"113.00",
"114.96",
"118.14",
"69796.43117029",
9347
],
[
1546300800,
"114.97",
"123.90",
"114.00",
"122.46",
"119.83",
"64248.31302812",
9713
],
[
1546387200,
"122.62",
"138.80",
"121.25",
"135.57",
"131.69",
"189734.68299147",
37935
],
[
1546473600,
"135.57",
"136.25",
"128.33",
"131.45",
"132.12",
"67066.92874540",
8790
]
],
"last": 1546387200
}
}
let empty= [];
feild.result.XETHZEUR.map(e=>{
empty.push(e[2])
empty.push(e[3])
})
empty.map(e=>{
if(e=="121.73"){
console.log(e)
}
if(e=="99.25"){
console.log(e)
}
})