Skip to content
Advertisement

USe data from another object VueJs

i have quick question here.

I have my object with value:

JavaScript

Then have API object (API is working fine, fyi)

JavaScript

I wanna do something like this (is not working of course):

JavaScript

I had method for this, it worked, but I think it can be easier to do that. Thanks a lot for any help

Advertisement

Answer

You can use something like nations[`${doctor.region}`]

Working code:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement