We see ourselves more as enablers and educators not as coder-bots.
I've pointed you in your other thread to some functions.
You just need to investigate and look at the samples in the provided links.
One additional hint for above code could be the use of strlen()
void myHandler(const char *event, const char *data) // pointers to so-called c-string arrays 'event' and 'data' are passed to the handler function
{
char myData[strlen(data)+1] = ""; //create a string array big enough to capture what's pointed to by 'data'
strncpy(myData, data, sizeof(myData)); // copy whats pointed to by 'data' to 'myData', this function will not overflow the size of myData
...
// parse to get what you need from myData;
...
}