Skip to main content
Solved

Read JSON to flat table

  • September 3, 2025
  • 3 replies
  • 40 views

margas
Contributor
Forum|alt.badge.img+3

Hi,

I’m struggling with reading JSON as a flat table, which I could use in GIS.

I have the following JSON:
 

I enabled option “Flatten Nested JSON Values into Attributes” but that produced one row with many columns. In some other post someone proposed a query json["collection"][*], but that also didn’t work.

What options should I use to produce a flat table with JSON attributes as column names?

Best answer by ebygomm

A JSONFragmenter with Flatten Query Result into Attributes set to Yes

You will need to expose the attributes, this can be done in the JSONFragmenter itself or in an AttributeExposer (easier as you can load from the cache)

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

ebygomm
Influencer
Forum|alt.badge.img+45
  • Influencer
  • Best Answer
  • September 3, 2025

A JSONFragmenter with Flatten Query Result into Attributes set to Yes

You will need to expose the attributes, this can be done in the JSONFragmenter itself or in an AttributeExposer (easier as you can load from the cache)


margas
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • September 4, 2025

Sorry for maybe stupid question: what is your input to JSONFragmenter?

I used JSON Reader and I don’t have an option in JSON Attribute = ‘json’:

Are you using another reader?


ebygomm
Influencer
Forum|alt.badge.img+45
  • Influencer
  • September 4, 2025

If you use a textfile reader and read whole file at once, you will have a text_line_data attribute that you can use as the json attribute