I am working with weather api, having problem with displaying the multiple results ad using $.each function...
Can someone please tell if i am doing wrong,,,, Script&html
<div id="fj"></div>
<script type="text/javascript">
$(document).ready(function () {
var teams;
$.getJSON("http://api.openweathermap.org/data/2.5/forecast/daily?lat=33.5689&lon=72.6378&cnt=10", function (dataDD) {
//do some thing with json or assign global variable to incoming json.
var tasks = $.parseJSON(dataDD.city);
alert(tasks);
//alert('empLoggedId');
$.each(tasks, function (key, value) {
$("#fj").append(data.weather.description);
});
});
});
</script>
Any kind of help or reference will be appreciated...Thanks for your time