I have been trying to convert this piece of string to proper JSON obj, after many string manipulation and trials and even after using JSON.parse and stringify funcs also couldnt help me. Can someone help me coverting this string to Proper JSON Obj?
"{n status: 'success',n message: 'The user is able to enter data in search bar.'n}n{ status: 'success', message: 'Number of cities with letter p are 4.' }n{n status: 'success',n message: 'Success messagecity addedappears in green'n}n{n status: 'success',n message: 'The city added is visible under Cities header.'n}n"
I tried using JSON.parse and stringify functions, also replaceAll,split(),but not helped.
2
Answers
But it’s a terrible way. It is better to bring to a normal view on the part of the sender of this disgrace.