The answer at How to make an AJAX call without jQuery? shows you how to do this.
Basically you make an XMLHTTPRequest to that URL, expecting application/json as an accept type. You then pull it into the JS using JSON.parse to convert the incoming data as a JS object. You can then interact with it normally.
<script type="text/javascript">
function loadXMLDoc() {
var xmlhttp;
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
} else {
// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == XMLHttpRequest.DONE ) {
if(xmlhttp.status == 200){
document.getElementById("myDiv").innerHTML = xmlhttp.responseText;
}
else if(xmlhttp.status == 400) {
alert('There was an error 400')
}
else {
alert('something else other than 200 was returned')
}
}
}
xmlhttp.open("GET", "https://api.mojang.com/users/profiles/minecraft/[VARIABLE_HERE]", true);
xmlhttp.send();
}
There's a number of ways of interacting with the XMLHTTPRequest object (See: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest). Alternatively, you can also use jQuery as stated in the answer if you already have it loaded for other purposes.
The object resulting from the JSON.parse() call would simply be exactly the JSON you posted, so you would do something like:
var playerData = JSON.parse(dataFromAjaxCall);
console.log(playerData.name); //[TEXT_HERE]