how to parse the json url response of xignite Api using jquery -


To display gold rates by using iam xignite api, whenever the URL passes in JSON, It does not print any output, plz helps me down my code in this regard:

  var dmJSON = "http://globalmetals.xignite.com/xGlobalMetals.json/ GetLondonFixing? Symbol = XAU & Currency = USD "; $ .getJSON (dmJSON, function (data) {$ .each (data, function (i, f) {var tblRow = "& lt; tr & gt;" + "& lt; td & gt;" + f.Outcome + "& Lt; / td>" + "& lt; td & gt;" + f.price + "& lt; / td & gt;" + "& lt; / tr & gt;" $$ ( TblRow) .appendTo ("#AccessData");});}); Do not try to repeat in    

$. Try it: Here is the string that you return data

  & lt; Html & gt; & Lt; Top & gt; & Lt; Script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; $ {Document} .ready (function () {var str = {"outcome": "registrationError", "message"): "XigniteGlobalMetals: Maximum number of unregistered requests exceeded. On registration or subscribing to increase usage Consider your IP address 112.196.34.74 for more information at http://www.xignite.com/registration-help. (Globalmetals.xignite.com: 20) "," Identity ":" IP "," Delay Null, "Date": Null, "Time": Null, "Fixing": Null, "Value": 0.0006475, "Name": Null, "Symbol": Null, "QuoteType": Null, "Money": Null, "Date" 0.0, "unit": zero, "source": faucet}; Var tblRow = "& lt; tr & gt;" + "& lt; td & gt;" + str.Outcome + "& lt; / td & gt;" + "& lt; td & gt;" + str. Price + "& lt; / td> + "& Lt; / tr & gt;" $ $ ('# TEST TABLE') Annex (TBRRO);}); & Lt; / Script & gt; & Lt; Table id = 'testTable' & gt; & Lt; TR & gt; & Lt; TD & gt; Results & lt; / TD & gt; & Lt; TD & gt; Price & lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt;   

this can help you

Comments

Popular posts from this blog

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -