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

166
Vistas
How to split a string into individual elements in javascript

I have a need to split a string in javascript to individual components. Let me go through the example of the requirement I'm having.

This is the string I'm having:

"[InsertDelta, position: 63, lines: [return {]]"

I need to split the above string into three components as below:

InsertDela
position: 63
lines: [return {]

Is there any way to separate the strings like this in javascript?

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

0

You can use split to split the string at "," and then use for each to iterate through the items.

let y = "[InsertDelta, position: 63, lines: [return {]]";
let x = y.split(",");
x.forEach(item => console.log(item.replace(/\[?\]?/g, "")));

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