I have a json in string format. I want to replace keys that start with "name" prefix to to "abc".
for example:
myJson = JSON.stringify([{"nameA": "1", "nameB": 2}])
and result should be:
`[{"abc":"1", "abc": 2}]`
Maybe just (?<=")name[^"]*(?=":)
myJson.replace(/(?<=")name[^"]*(?=":)/g, "abc")