About 650,000 results
Open links in new tab
  1. How to read JSON file with fetch() in javascript? - Stack Overflow

    Aug 15, 2018 · How can I read local JSON file with fetch function in javascript? I have JSON file with some dump data and one function which read JSON file on server. For example : …

  2. Read JSON File Using JavaScript - GeeksforGeeks

    May 3, 2025 · In JavaScript, there are multiple ways to read and parse JSON files. These methods can be used both in browser environments and in Node.js. 1. Using the fetch () API. …

  3. How to Read a JSON File in JavaScript – Reading JSON in JS

    Aug 2, 2022 · How to Read a JSON File in JavaScript with the Fetch API. One standard method we can use to read a JSON file (either a local file or one uploaded to a server) is with the …

  4. Using the Fetch API - Web APIs | MDN - MDN Web Docs

    Apr 28, 2025 · With the Fetch API, you make a request by calling fetch(), which is available as a global function in both window and worker contexts. You pass it a Request object or a string …

  5. How To Fetch Data From JSON File In JavaScript

    Mar 7, 2025 · Fetching data from a JSON file in JavaScript is a valuable skill that opens up many possibilities for your projects. I’ve shared a step-by-step guide to help you understand the …

  6. JavaScript Fetch API - W3Schools

    The Fetch API interface allows web browser to make HTTP requests to web servers. 😀 No need for XMLHttpRequest anymore. The numbers in the table specify the first browser versions that …

  7. How to Fetch and Display JSON Data in HTML Using JavaScript

    Feb 5, 2019 · In this tutorial, I will show you how to fetch and display data from a JSON file using vanilla JavaScript. So how will we achieve this? First, we will fetch the JSON data by using the …

  8. Javascript Import JSON file - How to Read JSON File in JS

    Sep 1, 2023 · To fetch the data.json file, you can use the Fetch API to send an HTTP request. Call the fetch() method as shown below: You need to pass the full URL of the location as an …

  9. How to Read a Local/Remote JSON File in JavaScript [Examples] …

    Nov 28, 2021 · Above, fetch is used to retrieve the file at the given URL. The first then statement retrieves the JSON parsed version of the response. The second then statement then contains …

  10. How to read an external local JSON file in JavaScript?

    fetch("test.json") .then(response => response.json()) .then(json => console.log(json)); It works perfect in Firefox, but in Chrome you have to customize security setting. Share

Refresh