I'm playing around with the http://randomuser.me/documentation.html api. It just generates random user data in json format. However, I can not seem to parse the response. Whenever I do, I just get undefined objects.
Here is my code:
<script>
$.ajax({
url: 'http://api.randomuser.me/',
dataType: 'json',
success: function (data) {
console.log(data);
alert(data.user);
}
});
</script>
<div id="user"></div>
data.results[0].user.name.first