enter code hereHow to access objects in Javascript
This is the Object trying to Access
Its returning 'UNDEFINED' why? It may be silly. please help me im new.
CODE :
app.controller("myCtrl", function($scope,Restangular) {
Restangular.setBaseUrl('http://localhost:8080/StrutsREST/api');
var arr=Restangular.all('interfaces').doGET();
var obj=arr.$object;
console.log(obj.A1);
});
As you are doing API call which is async you need to handle it as Promise by using .then statement