I am a beginner in working with json so need some help! I have a external json file that attached in a html file with these codes:
{
"reports": [{
"id": "1",
"name": "week",
"type": "bar",
"size": 12288
}, {
"id": "2",
"name": "month",
"type": "line",
"size": 242688
}]
}
And another external js main.js that attached too. I want to read datas in that json file in main.js in a array for example! what should I do? I have not any access to change the json file.
- : i have to use pure js !