# INSERT msg.payload.object into postgres table

**URL:** <https://discourse.nodered.org/t/insert-msg-payload-object-into-postgres-table/27793>\
**Category:** General\
**Created:** [4 June 2020 22:02 UTC](https://discourse.nodered.org/t/insert-msg-payload-object-into-postgres-table/27793 "2020-06-04T22:02:27Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [7 June 2020 15:18 UTC](https://discourse.nodered.org/t/insert-msg-payload-object-into-postgres-table/27793/6 "2020-06-07T15:18:30Z")

</div>

I don't know that db node but I doubt the format is correct. (I.e you've written js like syntax but I highly doubt it will evaluate the string concatenation with msg.payload)

Try putting a function node before the SQL node and build the SQL and pass it in.

Alternatively - perhaps that node mentions mustache format in its help info?

---

_[View the full topic](https://discourse.nodered.org/t/insert-msg-payload-object-into-postgres-table/27793)._
