Skip to main content

I am making a call to an API and getting a JSON in return. With the JSONFragmenter and it's flattening options, I can expose most of the attributes in the JSON into FME attributes, but I am getting stuck on a particular structure. Sometimes there's a little table within a single attribute in the JSON like so:

 

"related_objects":
                    {
                        "relation_name": "verbinding",
                        "relation_id": 1,
                        "objects": i
                            "randomid1",
                            "randomid2",
                            "randomid3"
                        ]
                    }
                ]

 

This indicates objects that are related in a particular way to the object in my query. I would like to generate a list of all of the related objects (randomid1, randomid2 etc.). I want to use that  list in my FME flow. The number of related objects might be one, or a hundred, in this case it's three.

How do I make FME turn that little array of three related objects into a list?

 

I include a slightly edited version of the whole API return.

Try something like this:

Result:

You may have to modify your JSON query above so that it matches your exact JSON document.


Thank you david_r that works!


Reply