Skip to main content

Hi, I have created some JSON in FME but would like to remove the first couple of levels.

At the moment I have:

 
    {
        "output" : {
            "status" : "200",
            "body" :  
                {
                    "well_id" : 25325,
                    "well_name" : "MYALL_CREEK_3",
                    "latitude" : -27.046011,
                    "longitude" : 149.236806
                },
                {etc

ideally I would like to remove the "output" level

 
    {
            "status" : "200",
            "body" :  
                {
                    "well_id" : 25325,
                    "well_name" : "MYALL_CREEK_3",
                    "latitude" : -27.046011,
                    "longitude" : 149.236806
                },
                {

Could you please tell me how to achieve this.

For reference my workbench looks like:

0684Q00000ArBCfQAN.png

 

Many Thanks,

Oliver

 

Since you're already using the JSONTemplater, I would suggest that you simply use the TEXTFILE writer rather than the JSON writer. Simply change the JSONFormatter output attribute to "text_file_data" and you should be ready to go.

That should accomplish what you're asking.


perfect, yes that did the job


Reply