Hey Marc,

Generate is not an array, but an object  (which can be used as a key/value
store).  There are a couple of possible problems, assigning to the object
instead of a property on the object, or assigning everything with the same
key.

Unfortunately, without more code (like the code that assigns the data to
the generate object) it's hard to tell what is happening.

-John
On May 23, 2015 6:23 PM, "Marc Phillips" <rmar...@gmail.com> 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).
>
> --
> 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 nodejs+unsubscr...@googlegroups.com.
> To post to this group, send email to nodejs@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/4c4c2ab2-2077-4ff2-a29f-a9f826a3e210%40googlegroups.com
> <https://groups.google.com/d/msgid/nodejs/4c4c2ab2-2077-4ff2-a29f-a9f826a3e210%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAMbK04xrG0FAwvLve7XqaNF4nyi_zHVvWnqLSkB8m5QFtR%3D5kg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to