Process Javascript Array of Arrays with Recursion -


I am creating a real-time chat app that allows you to reply to other people data is stored, Where each new message has an array to answer it, an array may look like the first message --- Answer the first message --- Reply to the sub-message Give - Talk to the first message - Answer to send message - Answer to send message

I am currently using the following code:

  function process (obje, throw) {throw (over); If (obj.child) {obj.child.forEach (function (child) {procedure (children, fun);}); }}  

and I tell it ( data is the array of all messages):

 for  (i = 0; I & lt; data; lang; i ++) {procedure (data [i] ['answers'], function (obje) {}); }  

It only begins to get the first answer of every message, and just leaves the rest. Any ideas for a recurring event that will stop it? I'm really stuck here. Thanks for any help!

No problem! I got it. I need to make another loop call inside the process function, such as: <(i = 0; i & lt; data.length; i ++) {procedure (for data [i] ['answer' '' P>

 ], function (obj) {for (c = 0; c> obj.length; c ++) {}}); }  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -