How to get name based on id through json
$(document).ready(function() { //starting jquery
//var uidmt=1;
var uidmt=window.localStorage.getItem('mtpwd');//calling data from localstorage
var output_noti = '';
$.getJSON("http://dharamart.blogspot.in///userid="+uidmt+"", function(mydata_noti) {/////first json to get data
$.each(mydata_noti.movielist, function(key_noti, value_noti){
var movid_noti=value.movie_id;
$.getJSON("http://dharamart.blogspot.in///Json_genre.aspx", function(mydata1) {/////secount json to get data
$.each(mydata1.genrelist, function(key1, value1){
var mid=value1.movie_type_id;
var mtype=value1.movie_type;
if(mid==genre) ////////mating the data
{
out=mtype;
}
});
if(movid==-1){
output+="No data found !";
}
else{
output+="'<tr>";
}
$(".pnlnot").html(output);
});
});
});
});
$(document).ready(function() { //starting jquery
//var uidmt=1;
var uidmt=window.localStorage.getItem('mtpwd');//calling data from localstorage
var output_noti = '';
$.getJSON("http://dharamart.blogspot.in///userid="+uidmt+"", function(mydata_noti) {/////first json to get data
$.each(mydata_noti.movielist, function(key_noti, value_noti){
var movid_noti=value.movie_id;
$.getJSON("http://dharamart.blogspot.in///Json_genre.aspx", function(mydata1) {/////secount json to get data
$.each(mydata1.genrelist, function(key1, value1){
var mid=value1.movie_type_id;
var mtype=value1.movie_type;
if(mid==genre) ////////mating the data
{
out=mtype;
}
});
if(movid==-1){
output+="No data found !";
}
else{
output+="'<tr>";
}
$(".pnlnot").html(output);
});
});
});
});
No comments:
Post a Comment
Dharamart.blogspot.in