Basically I am working with a string that is a json string and I would like to turn it into a real json (by using the JSON.parse()) but there are some quotation marks in the middle of the sentences.
Example: ‘{“author”: “Jonah D”Almeida”, … }’
(I want to replace the one in between D and Almeida)
As it already has quotation marks around the whole sentence, javascript gives an error because it can’t create a json out of it and so, to solve that basically I want to replace the quotation mark in the middle of the sentence for a ‘ but only if it has letters preceeding and following the quotation mark.
My thought: myString.replace('letter before ... " ... letter after', "'")
Any idea how can I get this right?