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

90
Views
filename in JSON

Below are the file location and loading of each of the CSS and JS filename.

<link href="css/default.css" rel="stylesheet" />
<script src="js/main.js"></script>

In XML the filename is entered as such?

let data = "";
let url = 'xml/emailtext.xml';
fetch(url).then(response => response.text()).then(data => {
    let parser = new DOMParser();
    let doc = parser.parseFromString(data, 'application/xml');
});

In JSON?

let strfy = JSON.Stringify('json/file.json');
let json1 = JSON.parse('strfy');
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

When reading a json file, you can read the stream with response.json() instead of response.text(). It returns a promise that will resolve to a javascript object or array if the file contains valid json.

fetch('https://jsonplaceholder.typicode.com/todos/1')
  .then(response => response.json())
  .then((obj)=>
  {
    console.log(typeof obj); // object (not json anymore)
    console.log(obj);
  });

obj above is not json; by then it has already been parsed into a javascript object.

about 4 years ago · Juan Pablo Isaza 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!