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

133
Views
Matriz de filtro: si la matriz existe en la matriz de objetos

¿Cómo filtro una matriz comprobando si una matriz aparece en la matriz?

cryptoData: Array(100) 0: {CoinInfo: {…}, RAW: {…}, DISPLAY: {…}}

Estoy tratando de verificar si cryptoData (Array) contiene la matriz DISPLAY y si no contiene DISPLAY, elimínelo de la matriz cryptoData y configure filterArray solo con los elementos que contienen DISPLAY Array.

Mi intento:

 var filterdArray = cryptoData.filter(function (el) { return cryptoData[el] === 'DISPLAY'; }); this.setState({ cryptos: filterdArray, refreshing: false, });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Como el valor es un objeto, puede usar hasOwnProperty para verificar si el objeto tiene una propiedad.

 var filterdArray = cryptoData.filter(function (el) { return el.hasOwnProperty('DISPLAY'); }); this.setState({ cryptos: filterdArray, refreshing: false, });
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!