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

193
Views
Cómo almacenar JSON en javascript usando hashmap

He usado la API de shrtcode y no sé cómo almacenar sus datos.

 var requestOptions = { method: 'GET', redirect: 'follow' }; fetch("https://api.shrtco.de/v2/shorten?url=www.google.com", requestOptions)//api .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error)); } Response ok true result code "fQdPc" short_link "shrtco.de/fQdPc" full_short_link "https://shrtco.de/fQdPc" short_link2 "9qr.de/fQdPc" full_short_link2 "https://9qr.de/fQdPc" short_link3 "shiny.link/fQdPc" full_short_link3 "https://shiny.link/fQdPc" share_link "shrtco.de/share/fQdPc" full_share_link "https://shrtco.de/share/fQdPc" original_link "http://www.google.com"

¿Cómo puedo imprimir o almacenar el valor de "full_short_link"?

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

¿Como esto?

 const doStuff = async () => { try { const res = await fetch('https://api.shrtco.de/v2/shorten?url=www.google.com'); const json = await res.json(); console.log('full_short_link', json.result.full_short_link); } catch (err) { console.error(err); } }; doStuff();

about 4 years ago · Santiago Gelvez Report
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!