Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

256
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda