# HTTP in HTTP out nodes to show results from database search

**URL:** <https://discourse.nodered.org/t/http-in-http-out-nodes-to-show-results-from-database-search/14873>\
**Category:** General\
**Created:** [28 August 2019 22:29 UTC](https://discourse.nodered.org/t/http-in-http-out-nodes-to-show-results-from-database-search/14873 "2019-08-28T22:29:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raj](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Raj](https://discourse.nodered.org/u/Raj)\
**Post date:** [28 August 2019 22:29 UTC](https://discourse.nodered.org/t/http-in-http-out-nodes-to-show-results-from-database-search/14873/1 "2019-08-28T22:29:37Z")

</div>

I have various fields from the results of a database search returned in, msg.test1[0]xxx where xxx are the field names, the data is in the name, field value notation from the view in debug.

How do I mix the information from the database with static information?

I was thinking something along the lines of

script  
variable-name = {{msg.test1[0]FirstName}}  
/script

h3 Hello /h3 variable-name '''

or even

''' h3 Hello /h3 {{msg.test1[0]FirstName}} '''

Sorry I could not get the page formatting above for the code right

I have looked in a debug node and all the fields with the contents of the variables are present.

I am using HTTP in post mode, then function node to setup database search details, followed by the database node to get the details, \< I then pass those details through a function node to change from msg.payload to msg.test1, as the orange template node needs to use the msg.payload field from what I understand\>. The static and dynamic data is merged in that template node, in default setup with moustache mode, I gave played with modes but none worked for me, it is then sent to an HTTP out node, to produce another web page with live data.

I am just unable to get any of the dynamic data from the database search to show up.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [29 August 2019 07:12 UTC](https://discourse.nodered.org/t/http-in-http-out-nodes-to-show-results-from-database-search/14873/2 "2019-08-29T07:12:19Z")

</div>

There’s a great page in the docs that will explain how to use the debug panel to find the right path to any data item.

[https://nodered.org/docs/user-guide/messages](https://nodered.org/docs/user-guide/messages)

---

<div class="post-metadata">

**Author:** ![Raj](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Raj](https://discourse.nodered.org/u/Raj)\
**Post date:** [29 August 2019 18:55 UTC](https://discourse.nodered.org/t/http-in-http-out-nodes-to-show-results-from-database-search/14873/3 "2019-08-29T18:55:20Z")

</div>

Thanks you ukmoose, I did look through that link.

The issue I have, is that I know the names of the elements I want, ie ,msg. test1[0]FirstName, I can see the value that this element has and the name in the debug node.

I am just not able to show that element on my local web page. I do not seem to be able to display it, even after trying numerous methods, I was hoping someone else had put data onto a webpage and can tell me the correct syntax.

---

<div class="post-metadata">

**Author:** ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)\
**Post date:** [29 August 2019 19:14 UTC](https://discourse.nodered.org/t/http-in-http-out-nodes-to-show-results-from-database-search/14873/4 "2019-08-29T19:14:45Z")

</div>

Can you show the flow and template code you have so far? You can export your flow through the hamburger menu, then paste it here by clicking on the `</>` icon in the editor for formatting. For formatting of inline/single line code put it between backticks. For multiline use the format that the \</\> button adds in.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [29 August 2019 19:18 UTC](https://discourse.nodered.org/t/http-in-http-out-nodes-to-show-results-from-database-search/14873/5 "2019-08-29T19:18:58Z")

</div>

> [@Raj](#):
>
> I know the names of the elements I want, ie ,msg. test1[0]FirstName,

I think you will find that is NOT the name. Try using the technique in the link to find the correct one. ( I think it will have an extra . )
