I'm using elasticsearch in order to create some visualization with kibana based on data i'm gathering from a sensor board, however I need some of this data in my Angular 9 application. I'm using elastic api's to get data and the only thing i can do is just log them, but i can't store them for further use. I tried the same thing with python and it worked well. What am i doing wrong with Angular?
"THIS IS THE CODE"
es.getSource({id: "1", index:"acc_sensor", _source:"true"},
function(error,response){
if(error){
console.log("search error: "+error);
}
else{
console.log("---Response---");
console.log(response);
console.log("---particular value---")
this.roll = response['roll'];
console.log(this.roll);
}});
"AND THIS IS WHAT I HAVE IN THE CONSOLE AFTER RUNNING THE CODE"
