Skip to main content

Hi,

 

I have a JSON return form a HTTPCaller with schema info. An example of the return looks like this:

{
  "name": "Administration",
  "properties" : {
    "Id" : {
      "type" : "number",
      "required" : true,
      "description" : "The given Id for the object"
    },
    "GeoType" : {
      "type" : "string",
      "required" : true,
      "description" : "The type of object"
    },

The json continues here with more schema info.

I want to turn the information into a table like this: 
 

I have 82 other JSON returns with the same layout but other “name” values and exposing them all takes to much time. I have tried to use JSON transfromers but so far no succes.
Is there a more dynamic solution to transforming the return to my desired solution?

Thanks in advance,

Sander

See this one here that should help: 

 

can you expose the attributes using the attribute exposer > cached features? or do you want it to be dynamic? if you want it to be dynamic you could use the schema scanner and set up a dynamic writer.


This works (after adding curly closing brackets to the given input):

Also see the attached workspace.


Hi andrewj74 and geomancer,

Thank you for your responses. Geomancer's solution worked for me and will set it as Best Answer.

I also managed to make a solution using the AttributeExploder after the first JSONFragmenter.
But it uses more transformers in the long run and Geomancer's solution is more in line with the format.

Thanks,

Sander


Reply