I have a huge Json file containing objects of the form:
{ "country" : "UK", "city" : "London" }
I want to limit the number of instances for each "country". Can I do this using regex?
I want to remove the whole block of object that contains "UK".
I tried something like ^{.*"UK".*},
(starts with {
contains "UK"
ends with },)
But this is wrong and I can't figure out the correct way.
Any help would be appreciated.