JSFiddle - React, Tailwind, and code Playground
JavaScript
$(document).ready(function(){
var myObj = $.getJSON('http://explica.co/stats/nba/teams/atlanta_hawks_roster_2016-17.array.json', function(data) {
console.log(data);
window.array = data;
return data;
});
document.write(window.array.length);
});
function objLength(obj){
var length = 0;
if(typeof obj != 'object'){
return false;
}
for(var i in obj) {
length++;
}
return length;
}