I have some strings like s0 = "\"first line,\\nsecond line,\\n\"", and some other strings like s1 = "first line,\nsecond line,\n", where s0 is like the string representation of the whole s1. I wonder if there's any easy way to convert s0 and s1 both way. I understand I could do replace. However, there might be a whole lot of other escape sequences to take care of.
JSON.parse(s0)?