【发布时间】:2016-03-01 00:45:27
【问题描述】:
base: "cmc stations"
clouds: {all: 76}
cod: 200
coord: {lon: 13.37, lat: 52.52}
dt: 1456791041
id: 2822234
main: {temp: 0.17, pressure: 1028.91, humidity: 77, temp_min: 0.17, temp_max: 0.17, sea_level: 1035.1,…}
name: "Tiergarten"
sys: {message: 0.003, country: "DE", sunrise: 1456811534, sunset: 1456850772}
weather: [{id: 803, main: "Clouds", description: "broken clouds", icon: "04n"}]
wind: {speed: 5.21, deg: 48.0012}
大家好,请用这个 json 和 reactjs ,我如何访问 main temp??
当我写 this.props.dates.main.temp 我总是得到 undefined ,但是如果我写 this.props.dates.name ,我没有问题,当我写 this.props.date.weather[0 ].description 响应未定义。 什么问题,我不知道...
【问题讨论】:
标签: javascript json reactjs