Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

278
Views
Problema de Javascript: cómo reemplazar las comillas dobles con una barra invertida y una comilla doble

Quiero convertir la cadena '"hello":1' a '\"hello\":1'

¿Observe la barra invertida única en la salida de arriba? Pero ninguno de los fragmentos a continuación produce este resultado. Son 2 barras invertidas o ninguna

 var str = '"hello":1'; str.replace(/"/g, '\"') => '"hello":1' str.replace(/"/g, '\\"') => '\\"hello\\":1' str.replace(/"/g, '\\\"') => '\\"hello\\":1'
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!