json generator from database for javascritp_infographic