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

119
Vistas
Javascript object result has additional character

This question might be ridiculous but I tried searching everywhere but I just can't find a good reference.

Why does some object in javascript has the structure like in the image attached below? enter image description here

There is t character. And how do I convert the normal object to that form? For instance:

{
    key: "training",
    amount: 4500,
    currency: "PLN",
    label: "Training",
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The character t is the class name of the object that is passed as the value of the key value. As user @Vishnudev mentioned in the comments.

Consider the following code to recreate the JavaScript object and its structure in the image.

Code

class t{
  constructor( amount, currency, _sdkType) { 
    this.amount = amount
    this.currency = currency
    this._sdkType = _sdkType
  }
}
let value = new t(4500, "PLN", "Money")
let object = {
  value: value
}

console.log(object)

Output

Result as seen in the browser console.

enter image description here

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