{
"Id": 46,
"Catnaam": "salontafels",
"ParentId": 36,
"Overzichtsafb": null
},
{
"Id": 47,
"Catnaam": "ronde salontafels",
"ParentId": 46,
"Overzichtsafb": null
},
{
"Id": 48,
"Catnaam": "houten salontafels",
"ParentId": 46,
"Overzichtsafb": null
},
I have JSON structure as shown above but what I want is the following:
{
Id: "46",
Catnaam: "salontafels",
ParentId: "36",
Overzichtsafb: null
},
{
Id: "47",
Catnaam: "ronde salontafels",
ParentId: "46",
Overzichtsafb: null
},
{
Id: "48",
Catnaam: "houten salontafels",
ParentId: "46",
Overzichtsafb: null
},
In Javascript I receive the JSON structure after calling a webmethod. There, I try to convert this JSON to what I want using a regular expression:
arr = arr.replaceAll(""([A-Za-z]*)":", "$1:");
But apparently, the regex doesn’t work, as the same JSON is returned from the regex. Does somebody have a suggestion about the regex I could use?