Manipulating many DOM elements from weather API

Manipulating many DOM elements from weather API

I am making a weather app.
Is there better way to select all needed data like temperature, sunsetTime etc. and manipulate the DOM? Do I need to write something like this 50 times?

let weatherData= document.querySelector("#weatherData").textContent = data.weatherData;

more code below

fetch("" + urlAPI)
        .then(res => {
          return res.json();
        .then(data => {
          const { temperature, summary, icon } = data.currently;

          const temp = Number(temperature.toFixed(1));
          let hourlySummary = document.querySelector("#hourlySummary").textContent = data.hourly.summary;
          let currentTemp = document.querySelector(".temperatureInC").textContent = temp;
          let shortSummary = document.querySelector(".summary").textContent = summary;
          let weekSummary = document.querySelector("#weekSummary").textContent = data.daily.summary;
          setIcon(icon, document.querySelector("#icon1"));

That is going to depend on the API you are using. What is the API?

What do you mean by write this 50 times?

Can you give a bit more detail of what you are trying to do here?