I have a db entry in json file as below
[
{
"appData": [
{
"author": "xyz",
"type": "unknown",
"name": "myapp",
"id": "2.0",
}
],
"version": "1.0",
},
{
"appData": [
{
"author": "abc",
"type": "unknown",
"name": "myapp",
"id": "2.3",
}
],
"version": "1.0",
}
]
i couldn't figureout exact query to get list of entry which matches {'author'='xyz' , 'version'='1.0'} which will give me below result
[
{
"appData": [
{
"author": "xyz",
"type": "unknown",
"name": "myapp",
"id": "2.0",
}
],
"version": "1.0",
}
]
This query i tried but it didn't work for me
db.search(reduce(lambda x, y: x & y,[where('appData').all(where(k)== v) for k, v in kwargs.items()]))
Any help is much appreciated! someone please help stuck from couple of days