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

127
Views
Sending Array in Ajax request

Anybody here understand who understands more Ajax. I'm not sure how to send a javascript array in an ajax request. Could someone send me an example of how the ajax request would look? I'm trying to to grab all the javascript data, bundle it into a container and send it per ajax request to coldfusion but I don't understand much ajax so everything would help me.

Thank you for all the answers.

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Example using axios library to send array of data in ajax request.

import axios from "axios"
async function sendJavascriptArrayData() {
  const postRequestData = {
    arrayOfStrings: ["react", "svelte", "solidjs"],
    arrayOfNumbers: [1, 2, 3],
  }

  try {
    const res = await axios.post("https://example.com", postRequestData)
    console.log(res.data)

  } catch (error) {
    console.log(error.response)
  }
}
about 4 years ago · Juan Pablo Isaza Report

0

to send an array javascript through a request you can stringify it ( transform it into plain text) via the JSON.stringify(array) and send it.

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