Let's say you have an array of similar json objects. Example object:
{
"field1": "bar",
"field2": 1,
"field3": true,
"field4": [1, 2, 3],
"field5": {
"nested": {
"other": [4, 5]
}
}
...
}Design a method to query this array. You have to design the code and the format of the query:
def search(docs, query):
passQuery examples: