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

229
Views
Join the name of the columns in comma-sperated format whilst parsing the table with Cheerio

I am trying to parse the columns and rows of the timetable and then have it in a CSV file to import it to my google calendar.

So I when I try to get the title of the columns for perhaps any data from the column it comes one under another (refer the pic below.) [out of the code on terminal1

the code for the above output can be found below.

const columnTitles = $('.spreadsheet .spreadsheet .columnTitles')
.each((i, element)=> {
  const nameLabel = $(element).text().trimStart().trimEnd();
  console.log(nameLabel );
})

Below is the screenshot of HTML Elements enter image description here

What am I missing on here? and how can I have it as comma-separated-values?

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

0

If it's just one table, then it's simple:

var html_table = $('.spreadsheet .spreadsheet .columnTitles');
var table_header = html_table.find('td').map(function() {return $(this).text().trim();}).toArray();
console.log('table_header', table_header.join(', '));
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!