I want to get all the keys called “name” in all of the 3 objects here and print their values, How can I do that ?

Expected output :

“Leanne Graham”, “Ervin Howell”, “Marina Howell”

"id": 1, "name": "Leanne Graham" "id": 2, "name": "Ervin Howell" "id": 3, "name": "Marina Howell"

@JeremyLT @bbsmooth I was trying to simplify my problem but I got confused, So here is the actual problem :

I’m trying to use the breaking bad API, I want to get episodes by season, the API doesn’t provide that option, So I want to get all seasons that has the same value

The API returns an array, but when I check its type, it prints “Object” and that made me confused, Here’s my code

The BreakingBadAPI 1918×365 51.4 KB

Thank you for your help :heart:

That’s my code

fetch("https://www.breakingbadapi.com/api/episodes")
    .then((response) => {
        return response.json()
    .then((data) => { return data })
    .then((data) => {
        console.log(data) 
/*  OUTPUT: 
Array(102) [ {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, … ] 
        console.log(typeof data) //Output: Object