In the string below, I want to split the string separated by "|" (which i can do)and would then like to compare the first part and the boolean part of each such string with the same parts of another string.
var str = "Jacobs21]2]0]Ronan]false|Tom]2]0]Joseph]true|Jacobs21]2]0]NAME$$ALL]false|";
- In the string above,
Jacobs21]2]0]Ronan]falseis one string and so on. - I am more interested in the
Jacobs21part of this string and the boolean value appearing at its end which is "false" here. - Now, I want to compare the first and the last part joined as a single string to form
Jocobs21falseand similarly, for the another stringtomtrueand make a comparison and see if there are any similar matches?