Using an If to check that a string contains a certain substring

Here is a code snippet to check that a string contains a certain substring. I copied the code from the DemoPDFTest_with_OCR macro that ships with Kantu.

{
      "Command": "storeEval",
      "Target": "var string = \"${q}\", substring = \"110\";  b= string.includes(substring); b;",
      "Value": "textfound"
    },
2 Likes