I am looking to clean up a JSON string from attributes that contain a particular property. In the following example I want to remove attributes whose values are objects with the "_href" property.
Original string:
[{
"name": "Test",
"junkAttributeA": {
"_href": "string",
"_type": "string"
},
"junkAttributeB": {
"_href": "string",
"_type": "string"
}
}]
Resulting string:
[{
"name": "Test"
}]
What RegEx pattern should I use to detect the unwanted attributes?