Answer the question
In order to leave comments, you need to log in
How to parse JSON file using JS?
Good afternoon!
I have a main.json file, how do I read it so I can use JSON.parse in JavaScript?
Answer the question
In order to leave comments, you need to log in
fetch('https://example.com/main.json')
.then(response => response.json())
.then(json => {
// console.log(json);
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question