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

409
Views
Angular/JavaScript: Can log out the array, but cant log out a single element

I spent two hours on i think should be a simple solution thus the html badness. How would i be able to display my tags? The html badness

The api call i make

The interfaces i put my data into(everything work except the arrays) The function that calls the api and gets the data that my html needs

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

0

According to your PhotoDetails interface, tags is of type Tag, not Tags. This means that detail.tags will return you a single Tag. If you want that to be an array your interface should be changed like so:

export interface PhotoDetails {
  ...
  tags: Tag[];
  ...
}

The Tags interface is most likely redundant, and you can get rid of it. When you want an array of Tag, just declare the type as Tag[].

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!