Turns JSON into data for network graph