Javascript parse and evaluate sql query in code

In Angular I have custom filter in which I build query. Filter returns array of conditions:

{
  conditionOperator: null
  filter: "sample text1"
  type: "contains"
},
{
  conditionOperator: "OR"
  filter: "sample test2"
  type: "equals"
},
{
  conditionOperator: "AND"
  filter: "sample test3"
  type: "equals"
}

Now, I need to evaluate above result from filter in TypeScript. It has only three condiditions but can be a lot of them. It’s only example.
I can parse above structure to statement:

0 OR 1 AND 2

Which structure of data I should use to write above statement and than execute it.
At the begin I have to get result from 1 AND 2 and in second step from 0 OR result (1 AND 2).
Any tree structure will be good?