Corrected error in the json data generation for graph