Find common words in a string
Hi, I have the following jsl code which prints the common words and the count. However, it doesn't appear to be counting it correctly.The output I am getting is:commonWords = ["c1" => 3, "cate" => 3]; It should be commonWords = ["c1" => 3, "cate" =>3, "shotp" => 3]; Any suggestions? input = "CATE_N_C1_Shotp,CATE_P_C1_Shotp,CATE_P_C1_Shotp";// input string
...
// Define boundary characters as _ and ,
b