Mabasej_Team/website/navbarclick.js

5 lines
220 B
JavaScript
Raw Normal View History

2021-05-10 22:29:01 +02:00
const object = { name: "John Smith" };
const json = JSON.stringify(object); // {"name":"John Smith"}
console.log(json);
const unquoted = json.replace(/"([^"]+)":/g, '$1:');
console.log(unquoted); // {name:"John Smith"}