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

136
Views
Limit object values of Array of objects according to model/interface?
export interface CountryInterface {
    countryNameEnglish: string;
    countryName: string;
}

let API_DATA = [{
    countryCode: "AE",
    countryName: "United Arab Emirates",
    countryNameEnglish: "United Arab Emirates",
    countryPhoneCode: "+971",
    published: true
    timeZone: "UTC+4"
}]

let countryObjectsArray: CountryInterface[] = API_DATA;

In this example, we have API_DATA of which we only need two values of the object instead of having all the unnecessary object values. But in the example above it will assign all the values. Is there any way to get this done without looping through the data array and assigning each?

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!