Json retuned from API #110
-
hi Renaud, What is the best way to display a simple/single json object returned from calling an API? Like one joke object. Do I always need a Mapper like in the museum example? With season greetings |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The museum example is not the general case, because in the MET API, the search HTTP endpoint (in In general, most REST endpoints return actual data and you don't need a mapper. If you need some sort of filtering/transformation of the returned data, you can probably just create a formula in the I hope it will help. |
Beta Was this translation helpful? Give feedback.
The museum example is not the general case, because in the MET API, the search HTTP endpoint (in
http-0
) returns a list of matching IDs. So you need to invoke another HTTP endpoint in order to fetch the datas from the IDs (inhttp-1
). That's why I use a mapper in this example, because it is an easy way to iterate through all the IDs and invoke thehttp-1
endpoint to fill the data.In general, most REST endpoints return actual data and you don't need a mapper. If you need some sort of filtering/transformation of the returned data, you can probably just create a formula in the
data source
property of the component using the data.I hope it will help.