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

151
Vistas
How to set google protobuf repeated field in javascript

For example, you have a google protobuf message Customer with repeated field like below.

message Customer {
  repeated int32 items = 1;
} 

How do you set the repeated items field in javascript?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

To set the repeated field in javascript,

You can use either setItemsList or addItems methods.

For example, to use setItemsList method

let customer = new Customer();
customer.setItemsList([12, 123, 1234]);

It will set the value of items to the javascript array.

Or for another example, to use addItems method

let customer = new Customer();
customer.addItems(123);

It will append the value of 123 to the list of items in the message.

For more info, you can check out the protobuf docs for repeated field in javascript.

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