I have a JSON file like this:
{
"_id" : ObjectId("5627ffddce2790eea0d96ba4"),
"type" : "FeatureCollection",
"crs" : {
"type" : "name",
"properties" : {
"name" : "urn:ogc:def:crs:OGC:1.3:CRS84"
}
},
"features" : {
"type" : "Feature",
"properties" : {
"id" : 17094.0000000000000000,
"osm_id" : 311636347.0000000000000000,
"name" : "King Charles Court",
"type" : "apartments"
},
"geometry" : {
"type" : "MultiPolygon",
"coordinates" : [
[
[
[
-123.1346724048378600,
49.2897742781884180
],
[
-123.1345008272799100,
49.2898879367954520
],
[
-123.1343453429760300,
49.2897882759667140
],
[
-123.1345169205340000,
49.2896744497216160
],
[
-123.1346724048378600,
49.2897742781884180
]
]
]
]
} # <-- I want to find this #
}
},
{
"_id" : ObjectId("5627ffddce2790eea0d96ba4"),
"type" : "FeatureCollection",
"crs" : {
"type" : "name",
"properties" : {
"name" : "urn:ogc:def:crs:OGC:1.3:CRS84"
}
},
"features" : {
"type" : "Feature",
"properties" : {
"id" : 17123.0000000000000000,
"osm_id" : 311859620.0000000000000000,
"name" : "The Burkingham",
"type" : "apartments"
},
"geometry" : {
"type" : "MultiPolygon",
"coordinates" : [
[
[
[
-123.1352148816112600,
49.2879125736745320
],
[
-123.1351233512286000,
49.2879720851870790
],
[
-123.1350737303618100,
49.2879396472218050
]
]
]
]
} # <-- I want to find this #
}
}
I want to find out the Regex that will find the first closing bracket (}) after the first closing square-bracket (]) of "coordinates". So after "coordinates" : [ ...]
it will match the first }
. I followed some regex
tutorials here but this seems to be a bit too complex for my current knowledge...