Page 1 of 1

Saving multiple push channels

Posted: Sun May 18, 2014 4:23 pm
by Anthony Hyams

I worked through the video tutorial on setting up push notifications. It all works except it only gives an example of saving a single channel.

return [parseInt(value)];

this all works but what syntax is required for multiple channels. Have tried various combinations. I have 5 check boxes whose vales equal the channel required so if 2 and 3 are checked I am returning "2,3" as the "value" how can I rewrite the line of code to send this as an array ?


Saving multiple push channels

Posted: Sun May 18, 2014 6:56 pm
by Anthony Hyams

solved it after some rooting around the following javascript did the job

JSON.parse("[" + value + "]");