My var show undefined but not in consolelog

{
"Meta Data": {
"1. Information": "Intraday (1min) prices and volumes",
"2. Symbol": "MSFT",
"3. Last Refreshed": "2018-04-26 10:54:00",
"4. Interval": "1min",
"5. Output Size": "Compact",
"6. Time Zone": "US/Eastern"
},
"Time Series (1min)": {
"2018-04-26 10:54:00": {
"1. open": "94.2500",
"2. high": "94.2700",
"3. low": "94.1500",
"4. close": "94.2100",
"5. volume": "22327"
},
"2018-04-26 10:53:00": {
"1. open": "94.1250",
"2. high": "94.2500",
"3. low": "94.1050",
"4. close": "94.2500",
"5. volume": "23824"
},
```this is the data sample and this is my code to 
 aiko:number;
 misfits(){let me=this;
 this.arr.forEach(function(entry) {
     console.log(entry);let x = Object.keys(entry)
     .map(function(key) { return entry[key] });
     console.log(x[0]['4. close']);
    me.aiko=x[0]['4. close']
 }); 
 
    
}
consolelog showss the correct answer 94.2100
but me.aiko always show undefined why is this what am i doing wrong?

can you share your code?? Its hard to decipher question…

what code u want see

It is very had to decipher, but you’re not returning anything from the function, console log is just telling you what the value is but you aren’t doing anything with it. As @vikrant17 says though, it’s not really possible to give a definite answer as can’t really tell what you’re trying to do.

the whole related code…codepen url or wherever you coded it.

i fixed the issue it was missing a this as last argument :slight_smile: