Answer the question
In order to leave comments, you need to log in
How to convert json to string and back?
I use the Editor.js library, at the output it gives a JSON object, which I need to transfer to the database as a string, upon receipt, I need to convert the string back to the same JSON.
How can I implement it?
Answer the question
In order to leave comments, you need to log in
JSON -> string
JSON.stringify(object);
string -> JSON
JSON.parse(string);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question