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

286
Views
How to access typescript object property from a string?

In typescript I have this object of type "Eular" (from three.js library). The object has 3 properties I can access x, y, z, like this

obj.z = 1;

But suppose I have this now

var key = "z";

How can I access the z property from using the variable key?

This doesn't work

obj[key] = 1;

I get this

Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Euler'.
  No index signature with a parameter of type 'string' was found on type 'Euler'.ts(7053)

Thanks

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!