Fetching JSON Data in Astro
Fetch
To fetch data in Astro, you need to request from the JSON url:
const RawData = new Request('https://example.org/data.json')
Then, format it to JSON, if not already:
const JsonData = RawData.json()
1 |
Last active
To fetch data in Astro, you need to request from the JSON url:
const RawData = new Request('https://example.org/data.json')
Then, format it to JSON, if not already:
const JsonData = RawData.json()
1 |