Process unstructured data in json format and calculate stats