How can I use the results of a SQL Query?

(Wt Intelligence) #1

I’m including a mySQL query in my BOT and I don’t know how to use the results I receive.

My results are like this one:

Result
{
“rows”: [
{
“DATA”: “2017-06-17T00:00:00.000Z”
}
],
“fields”: [
{
“catalog”: “def”,
“db”: “wtorlando”,
“table”: “HORARIOS_DISP_TL”,
“orgTable”: “HORARIOS_DISP_TL”,
“name”: “DATA”,
“orgName”: “DATA”,
“charsetNr”: 63,
“length”: 10,
“type”: 10,
“flags”: 32896,
“decimals”: 0,
“zeroFill”: false,
“protocol41”: true
}
]
}
And I need to use the DATA value (“2017-06-17T00:00:00.000Z”). How can I do that?

Thanks!

1 Like
(John Jackson) #2

You’d need to use {{ task.result__rows__0__DATA }}. This means, within the result output, search for “rows”, then look for the first item in the array (item “0”), then look for the property labelled “DATA”.

1 Like