How to parse a JSON http response ?

Hello Everybody,

I would like to parse a JSON http response and show only the values I'm interested in. I am trying with a!fromJson function but I am not able to get multiple values in the result body of the call integration to my webAPI.

I would really appreciate getting some help here please.

This is the Json that I receive. I would like to get some of the values from there and be able to filter those I'm interested in. Any ideas?

Gonzalo

  Discussion posts and replies are publicly visible

Parents
  • What specifically happens when you call a!fromJson on the above json string?  Any chance you can post it here as text instead of as a picture?

  • Hello, 

    Here is the json string as text: 

    {"coord":{"lon":-3.7,"lat":40.42},"weather":[{"id":801,"main":"Clouds","description":"few clouds","icon":"02d"}],"base":"stations","main":{"temp":297.85,"feels_like":296.53,"temp_min":296.15,"temp_max":299.15,"pressure":1026,"humidity":44},"visibility":10000,"wind":{"speed":2.6,"deg":120},"clouds":{"all":20},"dt":1590499496,"sys":{"type":1,"id":6443,"country":"ES","sunrise":1590468593,"sunset":1590521653},"timezone":7200,"id":3117735,"name":"Madrid","cod":200}

    If I want to post in a read-only interface the "temp" and "pressure" value only for example, what expression/function should I use?   

Reply
  • Hello, 

    Here is the json string as text: 

    {"coord":{"lon":-3.7,"lat":40.42},"weather":[{"id":801,"main":"Clouds","description":"few clouds","icon":"02d"}],"base":"stations","main":{"temp":297.85,"feels_like":296.53,"temp_min":296.15,"temp_max":299.15,"pressure":1026,"humidity":44},"visibility":10000,"wind":{"speed":2.6,"deg":120},"clouds":{"all":20},"dt":1590499496,"sys":{"type":1,"id":6443,"country":"ES","sunrise":1590468593,"sunset":1590521653},"timezone":7200,"id":3117735,"name":"Madrid","cod":200}

    If I want to post in a read-only interface the "temp" and "pressure" value only for example, what expression/function should I use?   

Children