I have below JSON output and want to get specific value based on input,
"quotes": {
"USDAUD": 1.278342,
"USDEUR": 0.908019,
"USDGBP": 0.645558,
"USDPLN": 3.731504
}
Now i have user input of USD and GBP
How can i get only specific value from "quotes",
I tried as below,
from = $("#from option:selected").val(); //this is USD
to = $("#to option:selected").val(); //this is GBP
then i made a string by
output = to + from;
and tried to get value in console
console.log(json.quotes); //this gives complete output in console
console.log(json.quotes.output); //but with this i could not get value of USDGBP
How can i get required value from JSON object?