JSON & JavaScript [closed]

0

Good morning. I am using this API: link

The problem is that when I make a console log, from the DATA of this api, this is the skeleton that it has:

The data is inside "0: Object".

To be able to access inside the code, I have to save it inside a variable:

For example:

  

var JsonAPI = res.data.results.0.username (the one that is 0 is the one that I do not know what to put.

I think I've explained myself wrong, but if you do not understand, tell me and I try to improve it.

Greetings

    
asked by PictorGames 29.03.2017 в 18:49
source

1 answer

5

with res.data.results[0].username should work

    
answered by 29.03.2017 / 18:54
source