Показать сообщение отдельно
  #3 (permalink)  
Старый 04.11.2016, 01:24
Интересующийся
Отправить личное сообщение для triest Посмотреть профиль Найти все сообщения от triest
 
Регистрация: 03.11.2016
Сообщений: 22

Сообщение от Coriolan161 Посмотреть сообщение
triest,

Тебе вообще что-то приходит? Просто если твои sun и base undefined то значит их нет в твоем temp1[0] в который ты пихаешь ответ
Вот вывод temp1[0] (жаль спойлеров нет):
[object Object] {
  city: [object Object] {
    coord: [object Object] { ... },
    country: "US",
    id: 4393217,
    name: "Kansas City",
    population: 0
  },
  cnt: 7,
  cod: "200",
  list: [[object Object] {
  clouds: 0,
  deg: 2,
  dt: 1478196000,
  humidity: 83,
  pressure: 1005.49,
  speed: 7.34,
  temp: [object Object] {
    day: 72.9,
    eve: 63.1,
    max: 74.1,
    min: 48.27,
    morn: 72.9,
    night: 48.27
  },
  weather: [[object Object] {
  description: "clear sky",
  icon: "01d",
  id: 800,
  main: "Clear"
}]
}, [object Object] {
  clouds: 8,
  deg: 146,
  dt: 1478282400,
  humidity: 72,
  pressure: 1010,
  speed: 5.41,
  temp: [object Object] {
    day: 65.77,
    eve: 58.51,
    max: 67.98,
    min: 42.17,
    morn: 42.17,
    night: 48.78
  },
  weather: [[object Object] {
  description: "clear sky",
  icon: "02d",
  id: 800,
  main: "Clear"
}]
}, [object Object] {
  clouds: 24,
  deg: 179,
  dt: 1478368800,
  humidity: 63,
  pressure: 1007.46,
  speed: 5.7,
  temp: [object Object] {
    day: 64.76,
    eve: 56.59,
    max: 67.1,
    min: 42.66,
    morn: 42.66,
    night: 44.64
  },
  weather: [[object Object] {
  description: "few clouds",
  icon: "02d",
  id: 801,
  main: "Clouds"
}]
}, [object Object] {
  clouds: 5,
  deg: 175,
  dt: 1478455200,
  humidity: 0,
  pressure: 1001.83,
  speed: 8.63,
  temp: [object Object] {
    day: 64.29,
    eve: 57.7,
    max: 64.29,
    min: 42.67,
    morn: 42.67,
    night: 51.91
  },
  weather: [[object Object] {
  description: "clear sky",
  icon: "01d",
  id: 800,
  main: "Clear"
}]
}, [object Object] {
  clouds: 72,
  deg: 189,
  dt: 1478541600,
  humidity: 0,
  pressure: 998.68,
  rain: 1.01,
  speed: 12.03,
  temp: [object Object] {
    day: 64.51,
    eve: 63.75,
    max: 64.51,
    min: 52.29,
    morn: 52.29,
    night: 57.97
  },
  weather: [[object Object] {
  description: "light rain",
  icon: "10d",
  id: 500,
  main: "Rain"
}]
}, [object Object] {
  clouds: 53,
  deg: 333,
  dt: 1478628000,
  humidity: 0,
  pressure: 999.97,
  rain: 0.7,
  speed: 7.18,
  temp: [object Object] {
    day: 65.8,
    eve: 63.84,
    max: 65.8,
    min: 56.77,
    morn: 56.77,
    night: 59.36
  },
  weather: [[object Object] {
  description: "light rain",
  icon: "10d",
  id: 500,
  main: "Rain"
}]
}, [object Object] {
  clouds: 59,
  deg: 67,
  dt: 1478714400,
  humidity: 0,
  pressure: 1002.23,
  rain: 3.61,
  speed: 8.41,
  temp: [object Object] {
    day: 63.37,
    eve: 60.64,
    max: 63.37,
    min: 54.54,
    morn: 58.24,
    night: 54.54
  },
  weather: [[object Object] {
  description: "moderate rain",
  icon: "10d",
  id: 501,
  main: "Rain"
}]
}],
  message: 0.0059
}
Ответить с цитированием