I have more of a general javascript question:
If i want to have a method get a .property from a json file, but i want which property to get to be inputted in the form of a string, how can I turn that string into the .property?
Here's an example, since i know that makes no sense:
If jsonObject is a valid JSON object retrieved from reading a file, and the json looks like this:{ keyOne: "seventeen", keyTwo: "fifty" }And I also have this method here:async function returnValue(input) { const getKey = input return jsonObject.getKey }Now let's say I want to get jsonObject.keyOne, which is "seventeen", and I do returnValue(keyOne) somewhere in my code. Obviously this wouldn't work, but i don't know what I need to do to make it work. How would I change the returnValue function so it does what I'm trying to do?
