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

140
Views
Mirth Javascript Cómo establecer el valor si el valor recibido está en una matriz

Lo que tengo que hacer es muy simple. Necesito configurar el valor PV1-2.1 si el valor PV1-18.1 recibido está en una lista de valores. Establecí mi variable en una matriz de esos valores, pero la comprobación no parece funcionar

 var type = ['YB','ES','EO','SO','CX'] if msg['PV1']['PV1.18']['PV1.18.1'] = type { msg['PV1']['PV1.2']['PV1.2.1'] = 'V'; }
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Debería intentar escribir su condición como:

 if(type.includes(msg['PV1']['PV1.18']['PV1.18.1'])){ msg['PV1']['PV1.2']['PV1.2.1'] = 'V'; }
about 4 years ago · Juan Pablo Isaza Report

0

Puede intentar recorrer la matriz y comparar con cada elemento:

 var type = ['YB','ES','EO','SO','CX']; var i = type.length(); while (i--){ if (type[i] == msg['PV1']['PV1.18']['PV1.18.1']){ msg['PV1']['PV1.2']['PV1.2.1'] = 'V'; } }
about 4 years ago · Juan Pablo Isaza Report
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!