# Issue with json parsing

**URL:** <https://talk.observablehq.com/t/issue-with-json-parsing/3266>\
**Category:** Help\
**Created:** [May 12, 2020, 2:34am UTC](https://talk.observablehq.com/t/issue-with-json-parsing/3266 "2020-05-12T02:34:33Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![aaronkyle](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/aaronkyle/32/8106_2.png) [@aaronkyle](https://talk.observablehq.com/u/aaronkyle)\
**Post date:** [May 12, 2020, 5:58am UTC](https://talk.observablehq.com/t/issue-with-json-parsing/3266/6 "2020-05-12T05:58:49Z")

</div>

I replicated the error. So yes - it’s visible here too.

Sorry that I am a bit delirious in writing this (it was late when I was poking around). One observation on your notebook is that it appears to be written like traditional JS. You might therefore find some tips for re-working it in:

> **[JavaScript cell | Observable documentation](https://observablehq.com/@observablehq/observables-not-javascript)**
>
> All your Observable questions answered

I’ll continue to go out on a limb here and suggest, too, that the error is similar to the one I was encountering here:

> [@Why do I get JavaScript undefined property in Observable but not in HTML?](https://talk.observablehq.com/t/why-do-i-get-javascript-undefined-property-in-observable-but-not-in-html/587/2):
>
> Hi Aaron, Sure! Here’s a fork of that notebook that works: [https://beta.observablehq.com/@tmcw/learning-javascript-and-observable-by-converting-a-fiddle](https://beta.observablehq.com/@tmcw/learning-javascript-and-observable-by-converting-a-fiddle) The changes are: The event-drops module expects d3 to be just ‘hanging around’ on the window object. This isn’t ideal: modules should really declare their dependencies and load them with AMD, but anyway - it’s not a dealbreaker. I added a cell that sets window.d3 = d3 and that makes event-drops happy. This was the issue that complained about…

While I can’t explain why your chart will render on load but not when re-running the `import` cell, from that thread and the errors you’re getting, I would imagine the root of the problem is with regard to how the `${ n.id }` is being created in your SVG?

… I’ll play around more later (if I have time), and I’ll avoid cluttering up the forum with non-tested responses next time! Sorry folks! Again - mostly here for solidarity.

---

_[View the full topic](https://talk.observablehq.com/t/issue-with-json-parsing/3266)._
