[Edit]
+
0
-
0
js remove curly brackets from json stringify
1 2 3 4 5 6 7const json = JSON.stringify(user); const text = json.replace(/[{}]/g, ''); // Example output: // // "id":1,"name":"Tom","age":25
1 2 3 4 5 6 7const json = JSON.stringify(user); const text = json.replace(/[{}]/g, ''); // Example output: // // "id":1,"name":"Tom","age":25