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

208
Vistas
Getting JSON object from a arraylist

I have specific problem with axios to getting JSON object from my arraylist, so instead of display my displayName on my nav bar, it display all response headers information, i don't know why ? :

enter image description here

that my json list from my localhost :

enter image description here

that my code :

<a class="nav-link dropdown-toggle text-nowrap px-3" v-d-toggle.user-actions>
    <img class="user-avatar" src="@/assets/images/avatars/0.jpg" alt="User Avatar"> 
    <span class="d-none d-md-inline-block"></span>{{jsonInfo}}
</a>

<script>
 import axios from 'axios'; 

 export default {
  data() {
  return {
      jsonInfo: [],
      
    }
 },
 mounted () {
  axios
   .get('http://localhost:5000/info/users')
   .then(response => (this.jsonInfo = response))
  
   }
 }
</script>
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Take a look at the axios docs. The response object contains much more than the data that you are requesting. If you are wanting the data in your jsonInfo array, you will want response.data instead of the full response object.

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