On May 23, 2015, at 6:19 PM, Marc Phillips wrote:

> I'm building up an object (or trying to) iterating though a json object and 
> gathering info based various rest calls:
> <pre>
>         var generate = {};
>         for(var protocol in buildout.protocols){
>                 for(var item in buildout.protocols[protocol]){
>                   switch (item) {
>                    .....
> </pre>
> 
> The problem I'm having is that after the for loop, the generate array only 
> holds the value of the last update, all the other info is missing.
> I'm sure I'm doing something obviously wrong here (converting some automation 
> scripts from perl to node).

Show us enough of your code that we can run it on our own systems. You haven't 
shown any code that sets anything in generate, for example, nor have you shown 
a definition of buildout. Also, you referred to generate as an array, but have 
declared it as an object; make sure you're using the right data type.


-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/A8399088-A0B6-4330-A00D-AB248DBF5B3B%40ryandesign.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to