parsing json results from webhooks in order to set to the document