Edit in JSFiddle

var fp = new Fingerprint2();
fp.get(function(result, components) {
	var json = {
  	result: result,
    components: components
  
  };
  document.getElementById("result").innerHTML = JSON.stringify(json, null, "  ")
});
<textarea id=result rows=100 cols=100></textarea>

              

External resources loaded into this fiddle: