HTTP in HTTP out nodes to show results from database search

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.

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

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.

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.

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 . )