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

182
Views
how to pass the data as object in jquery ajax

i want to receive the value thought itterator, when i use $('#someModal').find('input[name=nameProBangHHModal]').val(data[0].TenNhanQuyCach); -- it work as expected but when i use iterator the return show ([object Object].TenNhanQuyCach) not the data return. i try to seach for other topic but stuck in this. So how to get the data return in array[data[0]] with the value from the iterator method. Thank you for your time!

$.ajax({
            url: 'someurl to retrive data',
            type: 'POST',
            data: {id:id},
            success: function(data,status) {
                var tenCot = ['nameProBangHHModal','valueBangHHModal',];
                var tenCotTrongCsdl = ['TenNhanQuyCach','DonViTinh',];
                console.log(tenCotTrongCsdl[0]);
                for (i=0;i <= tenCot.length - 1;i++) {
                    $('#someModal').find('input[name="' + tenCot[i] + '"]').val(data[0]+'.'+tenCotTrongCsdl[i]');
                }
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!