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

197
Views
How to store JSON in javascript using hashmap

I have used the shrtcode api and I dont know how to store its data.

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"

How can I print or store the value of "full_short_link "?

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

Like this?

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!