I have some rather large JSON files. Each contains thousands of objects within one (1) array. The JSONs are structured in the following format:
{
"alert": [
{ "field1": "abc",
"field2": "def",
"field3": "xyz
},
{ "field1": null,
"field2": null,
"field3": "xyz",
},
...
...
]
What's the most efficient way to use Python and the json library to search through a JSON file, find the unique values in each object within the array, and count how many times they appear? E.g., search the array's "field3" objects for the value "xyz" and count how many times it appears. I tried a few variations based on existing solutions in StackOverflow, but they are not providing the results I'm looking for.