I have an array of string which looks like this:
ErrStr = [
\\abc\def\ghi; ,
\\klm\nop\qrs;
]
So, this array of strings will be dynamic, so what I want to extract is only the abc
and klm
from this array.
This piece of code is what joins the strings after filtering from the data:
let errorArr = filteredError.map(a => a.ErrStr.split('\\\\', '')).join('')
I tried the above code, it cuts the \\
and replaces with ,
but I am not able to figure out how do I remove the 2nd and 3rd part of the string. Thanks in advance.