I have a little problem. I want ot get information for current user from json url, but my Username is in variable. When I try to get and show information for current user name by ($('#result').append(data.users.Username);
) nothing happans. But if you do $('#result').append(data.users.Admin);
everything is work. My question is how to get infromation for current user when username is in variable? I will be very thankful if someone help. Thanks.
$('#start').on('click', function() {
var Username = $('#Username').val();
$.ajax({
url: 'jsonurl,
dataType: 'json',
})
.done(function(data) {
$('#result').html('');
$('#result').append(data.users.Username);
});
return false;
});