mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-27 15:22:56 +08:00
fix escape characters
This commit is contained in:
parent
01e4643b2e
commit
b4f6a8f5aa
@ -6,7 +6,10 @@ const toString = (value: string | object) => {
|
||||
|
||||
if (isObject) {
|
||||
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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user