# Can we pass array data to dispatcher?

**URL:** <https://forum.rasa.com/t/can-we-pass-array-data-to-dispatcher/15114>\
**Category:** Tutorials, Resources & Videos\
**Created:** [September 2, 2019, 2:21pm UTC](https://forum.rasa.com/t/can-we-pass-array-data-to-dispatcher/15114 "2019-09-02T14:21:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishwanathks](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/vishwanathks/32/3909_2.png) [@vishwanathks](https://forum.rasa.com/u/vishwanathks)\
**Post date:** [September 2, 2019, 2:21pm UTC](https://forum.rasa.com/t/can-we-pass-array-data-to-dispatcher/15114/1 "2019-09-02T14:21:29Z")

</div>

i will get the latest data using this–\> input = tracker.latest\_message.get(‘text’)

I have an array of data, I need to pass this array data as a bot response. how can I do that? I tried Bot is not responding how can we pass the same array output to bot repsonse using diapatcher ? is there any way i can do this ?

example: patterns = [‘ape’, ‘apple’, ‘peach’, ‘puppy’], input=‘appel’ --\> from the latest data from the user . i’m using difflib module to find similiar data in the array we get the output as a array as below Output : [‘apple’, ‘ape’] if i use print the outbut is print on the console , not as a bot response

2019-09-02 18:52:26 INFO rasa\_sdk.endpoint - Action endpoint is up and running. on (‘0.0.0.0’, 5055) [‘SelectTN’] 127.0.0.1 - - [2019-09-02 18:55:19] “POST /webhook HTTP/1.1” 200 182 0.032001

please some one help me how can i work on this ?

---

<div class="post-metadata">

**Author:** ![piyush29programmer](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/piyush29programmer/32/4050_2.png) [@piyush29programmer](https://forum.rasa.com/u/piyush29programmer)\
**Post date:** [September 2, 2019, 6:31pm UTC](https://forum.rasa.com/t/can-we-pass-array-data-to-dispatcher/15114/2 "2019-09-02T18:31:13Z")

</div>

Can you tell me exact response you wanted to be shown on bot UI? If input =\> appel then output =\> apple ape (as a single string) ?

---

<div class="post-metadata">

**Author:** ![vishwanathks](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/vishwanathks/32/3909_2.png) [@vishwanathks](https://forum.rasa.com/u/vishwanathks)\
**Post date:** [September 2, 2019, 6:43pm UTC](https://forum.rasa.com/t/can-we-pass-array-data-to-dispatcher/15114/3 "2019-09-02T18:43:42Z")

</div>

As a array (apple,ape) two values

---

<div class="post-metadata">

**Author:** ![IgNoRaNt23](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ignorant23/32/8029_2.png) [@IgNoRaNt23](https://forum.rasa.com/u/IgNoRaNt23)\
**Post date:** [September 3, 2019, 8:05am UTC](https://forum.rasa.com/t/can-we-pass-array-data-to-dispatcher/15114/4 "2019-09-03T08:05:14Z")

</div>

You can define a template like this in your domain

```
utter_output:
-text: Return output this way {output}

```

Now in your custom action you call the dispatcher via

```
dispatcher.utter_template('utter_output', tracker, output=<whatever you want>) 

```

with your desired output
