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

247
Views
¿Cómo publicar los datos de Axios tiene una matriz dentro?

Quiero publicar archivos en grupos. al almacenar la identificación del grupo, quiero enviar archivos a groupsFinal, pero axios.post () solo publicará en la primera matriz de groupsFinal, probé for loop pero falla la publicación de axios.

 let groups = [{id:"a001", groupName:"Group101"},{id:"a002", groupName:"Group202"}] let groupsFinal = []; for (let a = 0; a < groups.length; a++) { let d = JSON.parse(JSON.stringify(groups[a])); d.img = null; groupsFinal.push(d); } let p = { fileId: "file_001", groups: groupsFinal, // array[] }; return new Promise((resolve, reject) => { axios .post("/shareFileToGroup", p, { headers: { "Content-Type": "application/json" }, }) .then(function (response) { resolve("success"); }) .catch(function (error) { reject("error"); }) .finally(function () { // always executed }); });
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!