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

146
Vistas
object name with dot in it

I have some config file that I need to create, its a routers configuration file and I am trying to programmatically create the file. An excerpt of the file is like this.

link.b:{
  en:0x1f,
  an:0x1f,
  spdc:[0x0,0x00,0x00,0x00,0x00,0x00],
  dpxc:0x1f,
  fct:0x0,
  fp1:0x3e,
  fp2:0x3d,
  fp3:0x3b,
  fp4:0x37,
  fp5:0x2f,
  fp6:0x1f,
  lck:0x0,
  lckf:0x0,
  imr:0x0,
  omr:0x0,
  mrto:0x1,
  vlan:[0x1,0x01,0x01,0x01,0x01,0x01],
  vlnh:[0x0,0x00,0x00,0x00,0x00,0x00],
  vlni:[0x0,0x00,0x00,0x00,0x00,0x00],
  dvid:[0x1,0x000b,0x000b,0x000a,0x000b,0x0001],
  fvid:0x0,
  ir:[0x0,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000],
  or:[0x0,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000],
  srt:[0x0,0x00,0x00,0x00,0x00,0x00],
  suni:0x0,
  poe:[0x1,0x02,0x02,0x02,0x02,0x00],
  prio:[0xff,0x00,0x01,0x02,0x03,0x00],
  nm0:'506f727431',
  nm1:'506f727432',
  nm2:'506f727433',
  nm3:'343033',
  nm4:'343039'
},

So I need to somehow export link.b I can't create an object like that because I need to either nest b inside of link but then the output (expectedly) is

  link: {
    b: {
      en: 31,
      an: 63,
      spdc: [ 0, 0, 0, 0, 0, 0 ],
      dpxc: 63,
      fct: 63,
      fp1: 62,
      fp2: 61,
      fp3: 59,
      fp4: 55,
...

which is not valid for the router. and doing

'link.b' : {
      en: 31,
      an: 63,
      spdc: [ 0, 0, 0, 0, 0, 0 ],
      dpxc: 63,
      fct: 63,
      fp1: 62,
      fp2: 61,
      fp3: 59,
      fp4: 55,
....

Is equally invalid for the router. So is there anyway I can output link.b : { not 'link.b' : { and not link : { b: {

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