Skip to main content
Solved

how to break the JSON file into attributes?

  • June 3, 2020
  • 5 replies
  • 56 views

mr_fme
Enthusiast
Forum|alt.badge.img+9

Hi,

 

How can I broken the attached JSON file into attributes?

 

 

Thank´s

Best answer by steveatsafe

Hi @mr_fme,

Thanks for visiting LiveChat yesterday. Here's the workspace template I put together and also a small tweak to the sample data you provided as I added data for "risk" & "symptoms" to show the full workflow to get all attributes returned.

JSON_From_HttpCaller_Example.fmwt

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

erik_jan
Contributor
Forum|alt.badge.img+26
  • Contributor
  • June 3, 2020

Have a look at the JSONFlattener transformer.

That is built to take a JSON fragment and create attributes from it.


mr_fme
Enthusiast
Forum|alt.badge.img+9
  • Author
  • Enthusiast
  • June 3, 2020

Have a look at the JSONFlattener transformer.

That is built to take a JSON fragment and create attributes from it.

@erik_jan,

you are correct, but some attributes have values between square brackets and I cannot extract them correctly.

 

Look below:

 


erik_jan
Contributor
Forum|alt.badge.img+26
  • Contributor
  • June 3, 2020

@erik_jan,

you are correct, but some attributes have values between square brackets and I cannot extract them correctly.

 

Look below:

 

Those will become a list, that you can pick apart using the ListExploder transformer.

Hope this helps.


steveatsafe
Safer
Forum|alt.badge.img+13
  • Safer
  • Best Answer
  • June 4, 2020

Hi @mr_fme,

Thanks for visiting LiveChat yesterday. Here's the workspace template I put together and also a small tweak to the sample data you provided as I added data for "risk" & "symptoms" to show the full workflow to get all attributes returned.

JSON_From_HttpCaller_Example.fmwt


mr_fme
Enthusiast
Forum|alt.badge.img+9
  • Author
  • Enthusiast
  • June 5, 2020

Hi @mr_fme,

Thanks for visiting LiveChat yesterday. Here's the workspace template I put together and also a small tweak to the sample data you provided as I added data for "risk" & "symptoms" to show the full workflow to get all attributes returned.

JSON_From_HttpCaller_Example.fmwt

Thank´s @steveatsafe.

 

I´m glad for your attention