I have a complex json file where I can have multiple type of resources, type could be repeating as well. Given this I have two questions, I tried to search on net but didn't find any clue.
How I can find specific type say
type3resource object, it could return multiple resultsOnce I find specific resource, I want to add one more property and save it back as json
{ "resources": [{ "type": "type1", "name": "dummy1", "properties": { "p1": "v1" } }, { "type": "type2", "name": "dummy2", "properties": { "p1": "v1", "p2": { "k1": "v1" } } }, { "type": "type3", "name": "dummy3", "properties": { "p1": { "k1": "v1" }, "p2": { "k1": "v1", "k2": "v2" } } }, { "type": "type3", "name": "dummy4", "properties": { "p1": { "k1": "v1" }, "p2": { "k1": "v1", "k2": "v2" } } }] }