try Javaascript string.includes()
if ( !msg.payload.comments.toLowerCase().includes("qrt")){
msg = null;
}
return msg;
or in a switch node JSONata contains()
$contains( $lowercase($$.payload.comments), "qrt")
example
[{"id":"d25af463a7c58e7a","type":"inject","z":"c791cbc0.84f648","name":"","props":[{"p":"payload.comments","v":"tt qrt","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":130,"y":3280,"wires":[["c7ff0a7d.2aa708","55c36b04.3065f4"]]},{"id":"c7ff0a7d.2aa708","type":"function","z":"c791cbc0.84f648","name":"","func":"if ( !msg.payload.comments.toLowerCase().includes(\"qrt\")){\n msg = null;\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":360,"y":3300,"wires":[["f46e3f30e8f2459c"]]},{"id":"55c36b04.3065f4","type":"switch","z":"c791cbc0.84f648","name":"","property":"$contains( $lowercase($$.payload.comments), \"qrt\")","propertyType":"jsonata","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":350,"y":3360,"wires":[["f46e3f30e8f2459c"]]},{"id":"a0200cdbd74d6e7f","type":"inject","z":"c791cbc0.84f648","name":"","props":[{"p":"payload.comments","v":"ttt urt","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":130,"y":3320,"wires":[["c7ff0a7d.2aa708","55c36b04.3065f4"]]},{"id":"f46e3f30e8f2459c","type":"debug","z":"c791cbc0.84f648","name":"Output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":680,"y":3300,"wires":[]}]