Array data format redis pub sub channel

I am trying to publish a normal javascript array on a redis channel through node eg- [1,2,3]. Which i am then capturing through predis by subscribing to the same channel.

However the data always shows up as [object Object]. I have tried json stringify but parsing or on print_r the variable still shows up as [object Object] in php.

Anything that i am overlooking?

Just make sure you are not using toString() method anywhere to convert your array into a string. [object Object] is exactly what you'd expect if you use toString() instead of JSON.stringify()

Fixed the issue. There was a problem with the json structure.