javascript: get an item from the external list field with ajax – SP2013


my list with reference to the external list

I have a list and some columns retrieve value from the external list.
How to get all the elements of that list (img attached) with REST

I'm trying like this

function to bring requests () {
var list = "MetadataTabla";
var siteUrl = _spPageContextInfo.webAbsoluteUrl;
var hostweburl = _spPageContextInfo.webAbsoluteUrl;
+ _spPageContextInfo.webServerRelativeUrl;

var scriptbase = hostweburl + "/ _layouts / 15 /";
$ .getScript (scriptbase + "SP.RequestExecutor.js", runCrossDomain);
function executeCrossDomain () {
var executor = new SP.RequestExecutor (siteUrl);
var urlRest = siteUrl + "/ _api / web / lists / GetByTitle (& # 39;"
+ list + "& # 39;) / items?";
myList = [];
bring All Items ();
function bring All The Items () {
executor.executeAsync ({
url: urlRest,
type: "GET",
headers: {
"accept": "application / json; odata = verbose",
}
success: function (data) {
var jsonObject = JSON.parse (data.body);

$ .each (jsonObject.d.results, function (index, item) {

console.log (jsonObject.d.results)
});

}
error: function (error) {

alert (JSON.stringify (error));
}
});
}
}
}

Result:

Blockquote