How can you use Json from webhook?

How can you use Json from webhook?

I need to access one of the JSON variables in a custom function to remove a character. 


The code is: 
string cleanString(string filthystring_json)
{
email = filthystring_json.getJson("email");
return email.replaceAll(';','');
}

However, filthystring_json seems to be empty.

How can I get the json in the custom function?