JS basics, destructuring of objects

Hello I don’t undersand the following destructuring assignment:



const seasonConfig = {
  summer: {
    text: "Lets hit the beach",
    iconName: "sun",
  },
  winter: {
    text: "Burr, it is chilly",
    iconName: "snowflake",
  },
};

const getSeason = (lat, month) => {
  if (month > 2 && month < 9) {
    return lat > 0 ? "summer" : "winter";
  } else {
    return lat < 0 ? "winter" : "summer";
  }
};

  const season = getSeason(37.23452, new Date().getMonth());

  const { text, iconName } = seasonConfig(season);

Code (JavaScript):

seasonConfig are nested objects, right. However, when I fetch the season (summer or winter), I put it into an array-like structure: seasonConfig(season); for the destructuring assignment

Why is this? Season config is obviously not an array!?

Thanks a lot!!

SEMrush