Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3208

How to acess object provided by Ajax

$
0
0

Good Afternoon.

 

I´m trying to acess data from this URL "https://corsanywhere.herokuapp.com/http://services.odata.org/V2/(S(frik5l2zde0sxh4jiifyhqo4))/OData/OData.svc/Products(2)";

 

I can acess to this Data , doing this code :

var x;

  var aUrl =

  "https://cors-anywhere.herokuapp.com/http://services.odata.org/V2/(S(frik5l2zde0sxh4jiifyhqo4))/OData/OData.svc/Products(2)";

  var oModel = new sap.ui.model.json.JSONModel();

  var aData = jQuery.ajax({

  type: "GET",

  contentType: "application/json",

  url: aUrl,

  dataType: "json",

  success: function(data, textStatus, jqXHR) {

            x = data.valueOf();

            alert(x.Rating);

  }

  });

 

But when I try to acess the attribute x.Rating , he says that is unsigned .

 

Can tell me how to acess to some attribute from data ?

 

Thanks


Viewing all articles
Browse latest Browse all 3208

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>