So I have got a string that looks like below that I am trying to break up with regex.
[{"id":...,"fieldA":"data","adjustments":[{"id":....,"fieldA":"data"},{"id":....,"fieldA":"data"}],"fieldB":"data"},{"id":...,"fieldA":"data","adjustments":[],"fieldB":"data"}]
The goal is to group the strings between the, let's say parent, curly brackets.
The result would look like this
Group 1:
{"id":...,"fieldA":"data","adjustments":[{"id":....,"fieldA":"data"},{"id":....,"fieldA":"data"}],"fieldB":"data"}`
Group 2:
{"id":...,"fieldA":"data","adjustments":[],"fieldB":"data"}]
Now the string can have more of the parent {}
strings and there can be more than 2 child {}
within the parent.
What the frick do I use?