Define transform to turn strings into JSON objects