danstocker/jorder — Issue #4: Result data structure
Author: jonathanwoahn
Created: 2012-01-23 05:47:05+00:00
State: open

When i perform a simple search query, say on an object of, say, size 10, suppose that the items I'm looking for are in positions 3 and 7 of the object. The result that I get back, then, is an array of size 10, with all the array entries saying "undefined" except for positions 3 and 7, which have the results that I was looking for.

My question here is, is this by design, or am I doing something wrong? Because when I start to have objects with 1000's of items in them that I'm searching through, and getting a single result, I'm wondering if I'm going to be dealing with essentially empty, enormous arrays.

Mind you, I'm pretty new to javascript, so it's very likely that I'm doing something wrong here.