Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

154
Views
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?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!