associated to a section inside an iteration, i tried to do this but the object is still the same:
                  
                  
                  
                  
                  
                  for (const [i, sec] of sections.entries()) {
                  
                  
                      // Categories
                  
                  
                      for (const [x, ctg] of sec.categories.entries()) {
                  
                  
                          let response = await axios.get(
                  
                  
                              ${process.env.API_URL}/categories/${ctg.id}
                  
                  
                          )
                  
                  
                  
                  
                  
                          ctg = response.data
                  
                  
                          ctg.name = response.data.name
                  
                  
                          ctg.cat_id = x
                  
                  
                  
                  
                  
                          // Seasons
                  
                  
                          for (const [y, sea] of ctg.seasons.entries()) {
                  
                  
                              response = await axios.get(
                  
                  
                                  ${process.env.API_URL}/seasons/${sea.id}
                  
                  
                              )
                  
                  
                  
                  
                  
                              sea = response.data
                  
                  
                          }
                  
                  
                      }
                  
                  
                  }
                  
                  
                  
                  
                  
                  the category object doesn't have any cat_id and name property. What I did wrong?
                  
                  
                
check the response? maybe the server is not responding they way you expected
no one can help me?
Обсуждают сегодня