Skip to main content
Question

How do I get these JSON field extract in FME 2016

  • November 2, 2017
  • 3 replies
  • 24 views

dbklingdom
Contributor
Forum|alt.badge.img+7

I have HTTPCaller connect to JSONFragmenter connected to JSONExtractor. Are these list that have to be converted?

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

erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 2179 replies
  • November 2, 2017

I believe the ListExploder is what you are looking for.


takashi
Celebrity
  • 7843 replies
  • November 3, 2017

I think that the best way depends on the structure of the source JSON document and what your goal is. For example, if the JSON document was:

{
    "result" : [
        {"A" : 1, "B" : "foo"},
        {"A" : 2, "B" : "bar"}
    ]
}

The JSONFragmenter with this setting outputs two features - the first one has two attributes A = 1, B = "foo", and the second one has A = 2, B = "bar".

  • JSON Query: json["result"][*]
  • Flatten Query Result into Attributes: Yes

I guess basic structure of your JSON document is similar to the example above.


dbklingdom
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • 33 replies
  • November 7, 2017

Hey, thanks for the reply. listExploder worked great in 2017, 2016 is another thing.