mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-27 15:22:56 +08:00
Merge pull request #87 from AykutSarac/fix-escape-characters
Fix escape character rendering
This commit is contained in:
commit
65ca525451
@ -6,7 +6,10 @@ const toString = (value: string | object) => {
|
|||||||
|
|
||||||
if (isObject) {
|
if (isObject) {
|
||||||
const entries = Object.entries(value);
|
const entries = Object.entries(value);
|
||||||
const stringObj = entries.map((val) => [val[0], String(val[1])]);
|
const stringObj = entries.map((val) => [
|
||||||
|
JSON.stringify(val[0]).replaceAll('"', ""),
|
||||||
|
JSON.stringify(val[1]),
|
||||||
|
]);
|
||||||
|
|
||||||
return Object.fromEntries(stringObj);
|
return Object.fromEntries(stringObj);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user