I wonder if there exists some library to parse a JSON that contains logical operators to transform it into a flat query string.
Let's say as input I get:
{
"Children":[
{
"ID":1,
},
{
"ID":2,
},
{
"Children":[
{
"ID":3,
},
{
"ID":4,
}
],
"Type":"Or"
}
],
"Type":"And"
}
And I want to convert it into simply:
(3 Or 4) AND 1 And 2
How would you do this in Python?