JSFiddle - React, Tailwind, and code Playground

JavaScript

var chartinfo = {
	"c0": "0",
	"c1": "0"
};

var jqxhr = $.getJSON("http://127.0.0.1:8080/chartinfo", function (json1) {
	console.log("success");
})
	.done(function () {
	chartinfo = json1;
	alert("external chartinfo " + chartinfo.c0.name); // I need to use chartinfo here
})
	.fail(function () {
	console.log("error");
})