just add some string after ?q="AnyStateName"
like ?q=London
var city = $('#city').val();
$.get("api.openweathermap.org/data/2.5/weather?q="; + city, function (data, status) {
console.log(status);
$.each(data, function (index,value)
{
console.log(index + ": " + value);
}
}
});
},"JSON");
and getting this success
coord: [object Object]
sys: [object Object]
weather: [object Object]
base: stations
main: [object Object]
wind: [object Object]
clouds: [object Object]
rain: [object Object]
dt: 1436184609
id: 1259229
name: Pune
cod: 200
|