How to read JSON data output correctly?

(Александр Мамонтов) #1

I am geting Data by http-request from free.currencyconverterapi.com and it’s looks like this:

then trying to Send a Message with these parameters

but int answer from my bot doesn’t show the rate from this data. it looks like: _RUB}}

how to write this string to show data value (65.467…)? maybe the problem in syntax

(Karen Barker) #2

Hi @Alexandr_Mamontov,

It’s not possible I’m afraid to use a variable inside a variable as you are trying to do here. Instead you’ll have to access the Data Output as {{make_a_http_request_data.USD_RUB}}. :slight_smile:

(Александр Мамонтов) #3

Thank you for your answer)
So means it i have to Send Message as here?

And what to do if i want to use all of currencies? That part “USD_RUB” - i want to use it like a variable.
API request looks as:
https://free.currencyconverterapi.com/api/v6/convert?q={{ask_a_question.parsed_answer}}&compact=ultra
where {{ask_a_question.parsed_answer}} is “USD_RUB”

(Daniel Beckett) #4

Hi @Alexandr_Mamontov

For the send a message action that’s right.

I’m not quite sure what you’re asking for the API request. :thinking:
You can add in as many outputs as you like as part of that URL string so could just stack the currencies like you did in your message. Is that what you had in mind?