You must Sign In to post a response.
  • Category: JQuery

    Get json data from URL

    I want to display data currency value(3.8945) only from the URL: https://openexchangerates.orgapilatest.json?app_id=0277d31956db4d57af7207ca1ab782a5&symbols=MYR
    to my web page TextBox using jQuery.suggest me a way to do.
    Json result as below:

    "disclaimer": "Usage subject to terms:",
    "license": "",
    "timestamp": 1517839199,
    "base": "USD",
    "rates": {
    "MYR": 3.8945
    I tried this way but nothing to display my text box.
    <html xmlns="">
    <head runat="server">
    <title>JavaScript - read JSON from URL</title>
    <script src=""></script>
    <form runat="server">
    <asp:TextBox ID="txtRate" runat="server"></asp:TextBox>
    ', function(data) {
    var Rate = 'rates: ${data.rates}'
  • #769491
    I go t the result it is working fine.
    function(data) {
    var Rate = 'rates: ' + data.rates["MYR"];

  • Sign In to post your comments