# Arrays of value into postgre

**URL:** <https://discourse.nodered.org/t/arrays-of-value-into-postgre/17998>\
**Category:** General\
**Created:** [15 November 2019 13:18 UTC](https://discourse.nodered.org/t/arrays-of-value-into-postgre/17998 "2019-11-15T13:18:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pranavthakkar](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@pranavthakkar](https://discourse.nodered.org/u/pranavthakkar)\
**Post date:** [15 November 2019 13:18 UTC](https://discourse.nodered.org/t/arrays-of-value-into-postgre/17998/1 "2019-11-15T13:18:47Z")

</div>

Hi there ! I have problem with my scripting is that

my data is coming as an Arrays of value and I want this values dump in postgresql as individual columns.

i,e Like If my array of values are 10 I want this values store in individual (10) columns in the database.

How can i do this\>.

I have basic structure like this but what if I get 10 arrays of values to 100 values I have to manually write so much.

see below.

> This is basic of getting values from hardware

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/4/473ec66b9bf8831775ec2277f9a303b78f76a1b4.png)

> This is how i store it into function node
> 
> ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/1/1d9238341806313fc0c8e53ced58ec150f4c34a2.png)

Function node syntax

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/b/b270a3287165afb7cbba32653d1352ae715d471a.png)

> Now this function node script can be used in another function node.
> 
> ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/c/cd93bc5329f348f01921e6533d4202b2c04b7b2d.png)

> Data to database node script
> 
> ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/e970bc5cecc29f453ccc94c01fcbaba9b73f8d76.png)
