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

253
Views
convert json object to TypeORM Query

I have JSON object for filter

"filter": {
        "logic": "and",
        "filters": [
            {
                "field": "testName",
                "operator": "contains",
                "value": "ou"
            },
            {
                "logic": "or",
                "filters": [
                    {
                        "field": "testCode",
                        "operator": "contains",
                        "value": "ol"
                    },
                    {
                        "field": "sampleType",
                        "operator": "contains",
                        "value": "Blood"
                    }`enter code here`
                ]
            }
        ]
    }

want to convert to typeorm where query.output will be

SELECT `test_list`.`id` AS `test_list_id`, `test_list`.`test_name` AS `test_list_test_name`, `test_list`.`test_code` AS `test_list_test_code`, `test_list`.`sample_type` AS `test_list_sample_type`, `test_list`.`created_at` AS `test_list_created_at`, `test_list`.`updated_at` AS `test_list_updated_at` FROM `test_list`  WHERE (`test_list`.`test_name` LIKE '%ol%' AND ((`test_list`.`test_code` LIKE '%ol%' OR `test_list`.`sample_type` LIKE '%Blood%'))) ORDER BY `test_list`.`id` ASC LIMIT 10'

Please solve my problem .

about 4 years ago · Santiago Gelvez
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!