Get Json via $.getJSON() - Javascript jQuery

Javascript examples for jQuery:Json

Description

Get Json via $.getJSON()

Demo Code

ResultView the demo in separate window


<html>
 <head> 
  <script src="https://code.jquery.com/jquery-2.2.4.js"></script> 
  <meta name="viewport" content="width=device-width"> 
 </head> // ww w .  j  av  a 2  s .c  om
 <body> 
  <script>
var user "User name";
var req = $.getJSON('https://api.github.com/users/'+user);
req.then(function (data) {
  console.log(data);
});

      </script>  
 </body>
</html>

Related Tutorials