I got it solved; looks like my 2nd reply came in late; the first one where 
I mention the splice was what solved the issue

I narrowed it down to those lines was incorrect because of async.  My 
console.log (really a diff custom function) writes to db vs console; so the 
delay on that made it seem at that moment the data was getting lost, but in 
actuality, that function finished and went on to another function before 
even the second log event ran 


On Wednesday, January 6, 2016 at 1:04:18 AM UTC-5, Ryan Graham wrote:
>
> Where is data defined? It is hard to tell from the limited context what 
> else touches it.
>
> Remember that your callback is being called after Users.find() returns, so 
> if you are modifying that data array in any lines after that call to 
> Users.find(), they will modify the data before your console.log() it the 
> second time.
>
> ~Ryan
>
> On Tue, 5 Jan 2016 at 13:16 A <[email protected] <javascript:>> wrote:
>
>> Need suggestions, going crazy here
>>
>> I am missing my last row of my object array called: data
>>
>> console.log(data) //has 80 rows
>> Users.find({"_id": {$in: ids}}, {'_id':1, 'Fullname':1}, function(err, 
>> results) {  //i've used this query numerous times thought the whole site, 
>> nothing new
>>     console.log(data) //has 79 rows
>>       //... i do some stuff, but doesnt really matter ...//
>> });
>>                 
>>
>> Right after I run the mongoose  Users.find, the last element disappears; 
>> makes no sense to my why.  This happens every time, for every instance of 
>> the code run
>> I do have some code above it and after it, but I narrowed it down to 
>> these 3 lines.  Any Ideas? suggestions?  Row counts vary between execution 
>>
>> -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/nodejs/616a18d2-3b06-4758-ace5-c2bb6780b3e1%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/nodejs/616a18d2-3b06-4758-ace5-c2bb6780b3e1%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> -- 
>
> ~Ryan
>

-- 
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/110cf323-23db-4333-9b9f-18ee8cd0c05b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to