"data":{
"carList":[
{
"car_number":"浙AQ00000"
},
{
"car_number":"浙A002020"
},
{
"car_number":"浙A0000S0"
}
],
"carStatus":{
"浙AQ00000":"1111-01-22"
},
"ownCar":3
}
var CarId = res.data.data.carList[i].car_number;
var CarStatus = ''
if (res.data.data.carStatus.hasOwnProperty(CarId)){
CarStatus = res.data.data.carStatus.CarId
}
小程序中有第一块代码的数据,然后在.js中我想通过car_number获取carStatus中的数据,但始终获取不到,请问大家有什么办法吗