Question

How do I get these JSON field extract in FME 2016

  • 2 November 2017
  • 3 replies
  • 2 views

Badge +1

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


3 replies

Userlevel 2
Badge +16

I believe the ListExploder is what you are looking for.

Userlevel 2
Badge +17

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.

Badge +1

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

Reply