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

186
Views
How can I make an array of unique values from another, nested, array?

I bring in data from a spreadsheet into my html/javascript in an array that has multiple columns and rows. I then want to split this up into multiple smaller arrays as needed.

One of the columns has duplicates and for my purposes I need an array output of unique values. Other solutions cover only simple arrays, i.e., [1,2,3,4]

This works:

const newArray = [...new Set(array)];

This does not:

const newArray = [...new Set(array.column)];

Alternatively, since "this likely won't work if the array has object values," could I take the array.column and make it a seperate array and then apply const newArray = [...new Set(array)];?

 for(var i = 0; i < array.length; i++) {
  
  dropdown[dropdown.length] = new Option(array[i].column,array[i].column)
 
 }
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!