Skip to main content
Question

Json to csv convertion

  • Oct 27, 2026 9:51 PM UTC
  • 3 replies
  • 68 views

lucaszhang914
Contributor
Forum|alt.badge.img+1

Hello, I’m new to FME, and I was assigned a simple task to convert some json files to csv files so that they could be easily loaded into ODI.

It’s like:
 


json:

{
  "projects": [
    {
      "name": "Project A",
      "tasks": [
        {"id": 1, "title": "Design", "status": "Complete"},
        {"id": 2, "title": "Development", "status": "In Progress"}
      ]
    },
    {
      "name": "Project B",
      "tasks": [
        {"id": 3, "title": "Research", "status": "Pending"}
      ]
    }
  ]
}


csv:

name, title, status
Project A, Design, Complete
Project A, Development, In Progress
Project B, Research, Pending

 

I’ve spending 2 days on it and still don’t have a clue how to do it. Thanks in advance for your help.

If it is possible, would you please provide a fmwt? Big thanks again!

 

3 replies

nielsgerrits
VIP
Forum|alt.badge.img+67

Multiple ways to do this. One way:

  • JSONFragmenter to fragment on projects.
  • JSONFragmenter to fragment on tasks.
  • FeatureWriter to write to CSV.

Attached sample. 


lucaszhang914
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • Oct 29, 2026 5:00 PM UTC

Multiple ways to do this. One way:

  • JSONFragmenter to fragment on projects.
  • JSONFragmenter to fragment on tasks.
  • FeatureWriter to write to CSV.

Attached sample. 

Thanks so much! It works perfectly for me. But I still have another small trouble of a key having multiple values. Like:

 

{

  "projects": [

    {

      "name": "Project A",

      "tasks": [

        {"id": 1, "title": "Design", "status": "Complete"},

        {"id": 2, "title": "Development", "status": "In Progress", "participant": ["Peter", "Brian", "Lucas"]}

      ]

    }

  ]

}

 

to CSV:

name, title, status
Project A, Design, Complete, Peter
Project A, Development, In Progress, Brian
Project B, Research, Pending, Lucas

 


lucaszhang914
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • Oct 29, 2026 7:43 PM UTC

Multiple ways to do this. One way:

  • JSONFragmenter to fragment on projects.
  • JSONFragmenter to fragment on tasks.
  • FeatureWriter to write to CSV.

Attached sample. 

Thanks so much! It works perfectly for me. But I still have another small trouble of a key having multiple values. Like:

 

{

  "projects": [

    {

      "name": "Project A",

      "tasks": [

        {"id": 1, "title": "Design", "status": "Complete"},

        {"id": 2, "title": "Development", "status": "In Progress", "participant": ["Peter", "Brian", "Lucas"]}

      ]

    }

  ]

}

 

to CSV:

name, title, status
Project A, Design, Complete, Peter
Project A, Development, In Progress, Brian
Project B, Research, Pending, Lucas

 

No worries, I figured that out, ListExploder is exactly the one I was looking.