tag:support.nodebox.net,2012-11-01:/discussions/nodebox-2-3/5896-problem-with-some-field-values-not-found-in-queryjsonNodeBox: Discussion 2017-01-27T21:43:10Ztag:support.nodebox.net,2012-11-01:Comment/418004662017-01-25T21:12:57Z2017-01-25T21:12:57ZProblem with some field values not found in query.json<div><p>Hello John,</p>
<p>Is it possible to provide an example JSON file so that I can
look into this? Thanks.</p>
<p>Stefan</p></div>Stefan Gabrielstag:support.nodebox.net,2012-11-01:Comment/418004662017-01-25T22:51:44Z2017-01-25T22:51:44ZProblem with some field values not found in query.json<div><p>Hi Stefan,</p>
<p>Thanks for responding.</p>
<p>I created a simple example which shows the problem (attached).
The JSON file contains 50 FaceBook posts with four fields including
message. Of these 50 posts, 39 include message values.</p>
<p>If you just query for the message field ($..message), you get
all 39. But if you query for all the data ($.posts.data), you only
see 20 values in the message column; the rest are marked . See
attached screenshot.</p>
<p>In the process of creating this example, I discovered that even
though many of the values are missing in the Data view, they are
still there if you switch to the Viewer view. And if you do a
lookup on the query with only 20 values showing, the missing 19
values reappear.</p>
<p>So the values really are there. Some of them are just falsely
marked as in the data view.</p>
<p>I will leave the json_test.json file on my website for a few
days so you can verify. The zip file also includes the actual json
file. Please let me know what you find out.</p>
<p>Thanks!</p>
<p>John</p></div>johntag:support.nodebox.net,2012-11-01:Comment/418004662017-01-27T21:42:27Z2017-01-27T21:43:10ZProblem with some field values not found in query.json<div><p>Hello John,</p>
<p>The problem is indeed just a displaying problem. The messages
are still there and you can still query them. The data viewer
mistakenly assumes all records have an equal amount of fields and
tries to access them by the column number (instead of what you
would expect, the key). In CSV files this normally works because
the data format expects it. But JSON files can have any number of
fields. So in your example, some rows don't have a name property,
the ones displaying 'null', those are the ones that display 'not
found' as an unfortunate consequence. Thanks for pointing out this
bug, and I will put it in the issues list!</p>
<p>Stefan</p></div>Stefan Gabriels