Skip to main content
Solved

how to break the JSON file into attributes?


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

View original
Did this help you find an answer to your question?

5 replies

erik_jan
Contributor
Forum|alt.badge.img+18
  • 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
erik_jan wrote:

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+18
  • Contributor
  • June 3, 2020
mr_fme wrote:

@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+12
  • 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
steveatsafe wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings