send data to frontend via json