receiving 0 instead of array

6 views
Skip to first unread message

Nicolas

unread,
Jan 22, 2015, 8:15:06 AM1/22/15
to ape-p...@googlegroups.com
Hi all,

I am trying to send an array (or an object but it gives the same issue) to the client.

However, the client receives 0 instead of the array.

Any idea what the problem can be?

Does it ring a bell to anyone?

Thanks in advance.


Louis Charette

unread,
Jan 22, 2015, 12:22:27 PM1/22/15
to ape-p...@googlegroups.com
Hi,

Can you share your code?


  - Louis

Envoyé de mon iPhone
--
--
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-p...@googlegroups.com
To unsubscribe from this group, send email to
ape-project...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

---
You received this message because you are subscribed to the Google Groups "APE Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ape-project...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nicolas

unread,
Jan 22, 2015, 12:29:22 PM1/22/15
to ape-p...@googlegroups.com
Thanks Louis, but I think I sorted it out.

It had to do with associative arrays.

var arr=[];
arr["something"]="fdf";

APE did not like this.I could not send arr and was replacing it with 0.

So I transformed everything into objects.

And I am fine now.


PS: I also needed to use JSON.stringify to send the object. And build it back via JSON.parse on the client side.

Reply all
Reply to author
Forward
0 new messages