Cant enter JSON data

I have a crazy error.
My app receives this JSON string:

So i receive it with no errors. I save the data to a public data:any; variable.
But when i try to enter the keys like this


nothing happen…
For other Objects it works well, but not with this one.

I hope someone can help me :slight_smile:

better you post your code, difficult to say so

My Service.ts

loadHerobyName(platform, region, tag, mode, hero) {
    return new Promise(resolve => {
        this.http.get(this.api + platform + '/' + region + '/' + tag + '/' + mode + '/hero/' + hero + '/')
            .map(res => res.json())
            .subscribe(data => {
       = data;

My heroPage.ts

loadHerobyName(mode, hero) {
    this.dataLoaded = false;
    this.apiService.loadHerobyName(this.platform, this.region, this.tag, mode, hero)
        .then(data => {
            this.heroData = data;
            this.dataLoaded = true;

in which line are you getting the error?

if nothing happens and you get no error, debug to see if data is retrieved.

have u tried this?

I don’t get an error, i just see nothing.

When i type just {{heroData}} it shows me [Object object]. But i can’t get the value of the keys. But in other JSON String with [Object object] it works with data?.key

the console.log() shows me that i received the data.

Any solution? I dont understand why it dont work for this JSON String…

you have to debug, this is not an Ionic issue for sure



Sure that works, but the goal of writing data?.key is, that i don’t need the Object name. Because there are 20 different Objects that i can receive…