Get data from Json URL in asp.net
I have json URL and i want to implement in the Asp.NET https://openexchangerates.org/api/latest.json?app_id=0277d31956db4d57af7207ca1ab782a5&symbols=MYR,EUR,AED,CADResult in web page is:
{
"disclaimer": "Usage subject to terms: https://openexchangerates.org/terms",
"license": "https://openexchangerates.org/license",
"timestamp": 1517025604,
"base": "USD",
"rates": {
"AED": 3.673018,
"CAD": 1.231755,
"EUR": 0.804525,
"GBP": 0.706185
}
}
I want to display the above result in asp.net page. I tried the code as below but nothing to shown in the page.
My code as below:
<body>
<form id="form1" runat="server">
<script type = "text/javascript" language = "javascript">
$.get('https://openexchangerates.org/api/latest.json', {app_id: 'Y0277d31956db4d57af7207ca1ab782a5', symbols: 'QAR,RUB,SEK'}, function(data) {
var text = 'Result: ${ data.rates.SEK}';
$(".mypanel").html(text);
});
</script>
</form>
</body>