I have a string that looks like this:
var str = "'1vK3KfqgSHqv5Y0066FnIY',#41,$,$,(#149,#488,#862,#945,#1028,#1249),#114";
Usually I would just:
str.split(",");
But this will result in:
[
"'1vK3KfqgSHqv5Y0066FnIY'",
"#41",
"$",
"$",
"(#149",
"#488",
"#862",
"#945",
"#1028",
"#1249)",
"#114"
]
Whereas the desired result is:
[
"'1vK3KfqgSHqv5Y0066FnIY'",
"#41",
"$",
"$",
"(#149, #488, #862, #945, #1028, #1249)",
"#114"
]
How would I achieve this?
"'1vK3KfqgSHqv5Y0066FnIY',(#1,(#41,$),$,(#149,#488,#862,#945,#1028,#1249),#11),#114"? How should look the expected result?