My question is pretty simple. I have a json file stored and I fetch it using a simple xml request and store it for later use in the localstorage. Now What I need to do is that when the user selects something from the select tag, I fetch the value of the tag and use it get the data from json.
For ex:
database.Class.Teachers."The value from the select tag".age
Is this possible with javascript or similar workaround?
Stephane Gosselin
9,1485 gold badges45 silver badges68 bronze badges
1 Answer 1
Ok i got the answer. Thanks.
link for the working code i found. How do I access a JSON object using a javascript variable
Sign up to request clarification or add additional context in comments.
Comments
lang-js
database.Class.Teachchers[valueFromSelect]. Hope this helps.