node pg and postgres jsonb data type

client.query('insert into users ( data ) values ( $1 )', [ [1,2,3] ], function( error ){
/* ERROR */
});
{ [error: invalid input syntax for type json]

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Univision and ReactJs — The Beginning of a Love Affair

Your First Express JS API on Azure Web APP

Week 3: Intro to JavaScript and React

Create a Full-Stack Web App Using React and Node.js

JavaScript Hacks you must know to code like a pro.

Most Profitable App Ideas for Restaurants to Follow in 2022

How can we use Amazon SES template to send email in Node.js?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
none

none

More from Medium

Access Delegation with OAuth2

Basic NoSQL Queries used in MongoDB

MySQL Shutdown Unexpectedly Error

Deploying a Java Web Application in Apache Tomcat App Server.