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

160
Views
Recuperar el valor de una matriz 3D

Digamos que tengo una matriz 3D como esta

 [ [ [3.12234, 50.12322], [3.12332, 12.12323], [3.431232, 122.22317], ], ]

¿Cómo debo codificar para obtener cualquiera de los valores en esta matriz?

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

1) Puede usar la indexing de matrices como:

 const arr = [ [ [3.12234, 50.12322], [3.12332, 12.12323], [3.431232, 122.22317], ], ]; const valueUsingMethod1 = arr[0][0]; console.log(valueUsingMethod1);

2) También puede usar array-destructuring como

 const arr = [ [ [3.12234, 50.12322], [3.12332, 12.12323], [3.431232, 122.22317], ], ]; const [[valueUsingMethod2]] = arr; console.log(valueUsingMethod2);

3) También puedes usar flat aquí

 const arr = [ [ [3.12234, 50.12322], [3.12332, 12.12323], [3.431232, 122.22317], ], ]; const [firstValue] = arr.flat(1); console.log(firstValue);

about 4 years ago · Juan Pablo Isaza Report

0

Prueba esto:

 var test = [ [ [3.12234, 50.12322], [3.12332, 12.12323], [3.431232, 122.22317], ], ] var open = test[0] // get the array [2] // get either [3.12234, 50.12322], [3.12332, 12.12323], or [3.431232, 122.22317] [1] // get item [0] or [1] from each value console.log(open);
 <body> </body>

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!