Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

144
Views
¿Cómo almaceno la salida de JSON fetch en una variable (Javascript)?

Tratando de obtener estos géneros y guardarlos en una matriz llamada géneros que se pueden usar con dom y reaccionar. ¿Cómo hago esto? En este momento, todo lo que puedo hacer es consolarlos.

 const genres = [""]; const options = { method: 'GET', headers: { 'X-RapidAPI-Key': '8a7d386af8msh99bcb7b70a0270ep1d0017jsn4f50689ce12a', 'X-RapidAPI-Host': 'moviesdatabase.p.rapidapi.com' } }; fetch('https://moviesdatabase.p.rapidapi.com/titles/utils/genres', options) .then(response => response.json()) .then(d => {for(let a of d.results){ if(a != null){ genres.push(JSON.stringify(a)); console.log(a); } }}) .catch(err => console.error(err)); console.log(genres);``` Any help would be appreciated. Let me know if you need anymore info as to what I am doing.
about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!