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

488
Views
Vue.js ¿Cómo puedo leer los valores de la matriz en [__ob__: Observer]

Necesito crear una matriz que leerá 4 valores de tipo cadena y luego pasará en un gráfico para crear sus columnas.

Esta es mi matriz a continuación (poo: []):

 data() { return { graphicData: { type: 'bar', data: { labels: [], datasets: [], }, options: { responsive: true, lineTension: 1, scales: { yAxes: [ { ticks: { beginAtZero: true, padding: 25, }, }, ], }, }, }, average: 0, stepsGrade: [], poo: [], //This is my array

Le paso los valores en este caso de interruptor calculado

 case 'P4': if (this.stepsGrade[0].step_grade > 92) { this.stepGradeIcon.push({ icon: 'mdi-emoticon-happy', color: 'green' }); this.poo.push('green');; } else { this.stepGradeIcon.push({ icon: 'mdi-emoticon-sad', color: 'red' }); this.poo.push('red'); } if (this.stepsGrade[1].step_grade > 88) { this.stepGradeIcon.push({ icon: 'mdi-emoticon-happy', color: 'green' }); this.poo.push('green');; } else { this.stepGradeIcon.push({ icon: 'mdi-emoticon-sad', color: 'red' }); this.poo.push('red'); } if (this.stepsGrade[2].step_grade > 84) { this.stepGradeIcon.push({ icon: 'mdi-emoticon-happy', color: 'green' }); this.poo.push('green');; } else { this.stepGradeIcon.push({ icon: 'mdi-emoticon-sad', color: 'red' }); this.poo.push('red'); } if (this.stepsGrade[3].step_grade > 80) { this.stepGradeIcon.push({ icon: 'mdi-emoticon-happy', color: 'green' }); this.poo.push('green');; } else { this.stepGradeIcon.push({ icon: 'mdi-emoticon-sad', color: 'red' }); this.poo.push('red'); } break; } return this.stepGradeIcon;

En el registro de mi consola tengo los datos de la siguiente manera

 [__ob__: Observer] 0: "red" 1: "green" 2: "green" 3: "green" length: 4 __ob__: Observer {value: Array(4), dep: Dep, vmCount: 0} [[Prototype]]: Array

¿Cómo puedo leer estos 4 valores?

trato de usar

 var parsedobj = JSON.parse(JSON.stringify(this.poo)); console.log(parsedobj);

Básicamente, mi matriz solo se observa pero nunca cambia y guarda el nuevo valor

about 4 years ago · Juan Pablo Isaza
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!