Greetings. I am currently facing a challenge in navigating through a nested JSON file. Below is the JSON data that I need assistance with:
{"Id":466,"Name":"korea",
"Occurrences":
[
{"OccurrenceDate":"\/Date(1398207600000+0100)\/","OccurrenceFrequency":27},
{"OccurrenceDate":"\/Date(1398726000000+0100)\/","OccurrenceFrequency":1},
{"OccurrenceDate":"\/Date(1398898800000+0100)\/","OccurrenceFrequency":4},
{"OccurrenceDate":"\/Date(1399071600000+0100)\/","OccurrenceFrequency":303}]}
Below is my current JavaScript code:
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
d3.json("data2.json", function(error, data) {
data.forEach(function(d) {
console.log(d.Id)
console.log(d.Name)
console.log(d.Occurrence.OccurrenceFrequency)
console.log(d.Occurrence.OccurrenceDate)})
return d;
});
});
</script>
I would greatly appreciate any assistance provided. Thank you!