Hello, I am working with a JSON file and I need to manipulate the content of the chapters array. Specifically, I want to remove the curly braces from inside the strings but only if they contain more than three words (two spaces). Is it achievable using Regular Expressions?
{
"abbrev": "gn",
"name": "Genesis",
"chapters": [
[
"And the earth was without form, and void; and darkness {was} upon the face of the deep. And the Spirit of God moved upon the face of the waters.",
"And God said, Let there be light: and there was light.",
"And God saw the light, that {it was} good: and God divided the light from the darkness. {the light from...: Heb. between the light and between the darkness}",
"And God called the light Day, and the darkness he called Night. And the evening and the morning were the first day. {And the evening...: Heb. And the evening was, and the morning was etc.}",
"And God said, Let there be a firmament in the midst of the waters, and let it divide the waters from the waters. {firmament: Heb. expansion}"
]
] }
I have attempted to use negative look ahead in my Regular Expression but with unsatisfactory results. If removing curly braces is not feasible through Regular Expressions, what would be an alternative solution using JavaScript?