Re: [JSMentors] Better JSON traversal?

2011-09-27 Thread Dean Landolt
On Tue, Sep 27, 2011 at 10:18 AM, Jan Frühwacht wrote: > So indexing just moves the processing time to the beginning instead of > runtime object resolution and creates the flattest hierachy. > Is that right ? > Pretty much. I wouldn't say it *moves* the processing time to the beginning -- indexin

Re: [JSMentors] Better JSON traversal?

2011-09-27 Thread Jan Frühwacht
So indexing just moves the processing time to the beginning instead of runtime object resolution and creates the flattest hierachy. Is that right ? 2011/9/20 Rey Bango > Very cool. Thanks! :D > > > On Tue, Sep 20, 2011 at 12:09 PM, Dean Landolt wrote: > >> >> >> On Tue, Sep 20, 2011 at 9:55 AM,

Re: [JSMentors] Better JSON traversal?

2011-09-20 Thread Rey Bango
Very cool. Thanks! :D On Tue, Sep 20, 2011 at 12:09 PM, Dean Landolt wrote: > > > On Tue, Sep 20, 2011 at 9:55 AM, Rey Bango wrote: > >> Good question, Dean. This was presented to me this weekend by someone who >> needs to work with the data as is. Not sure why but that's what they have to >> w

Re: [JSMentors] Better JSON traversal?

2011-09-20 Thread Dean Landolt
On Tue, Sep 20, 2011 at 9:55 AM, Rey Bango wrote: > Good question, Dean. This was presented to me this weekend by someone who > needs to work with the data as is. Not sure why but that's what they have to > work with. > Oh, I'd assumed this data was mocked because of the glaring bug in the orig

Re: [JSMentors] Better JSON traversal?

2011-09-20 Thread Rey Bango
Good question, Dean. This was presented to me this weekend by someone who needs to work with the data as is. Not sure why but that's what they have to work with. So regardless of the structure, what *I'm* personally interested in at this moment is helping them optimize the traversal of the data. C

Re: [JSMentors] Better JSON traversal?

2011-09-19 Thread Dean Landolt
On Sun, Sep 18, 2011 at 12:19 AM, Rey Bango wrote: > Hey guys, > > The code below loops over some JSON data. It' simple in that it looks for a > specific note and then a specific chord within the note. It then returns the > strings. > > I'm using for loops to handle it but wanted to ask if there

Re: [JSMentors] Better JSON traversal?

2011-09-19 Thread Diego Perini
On Mon, Sep 19, 2011 at 1:33 PM, Nick Morgan wrote: > On 19 September 2011 11:56, Samuel Richardson wrote: >> From memory, most browsers will keep the order intact with the exception of, >> weirdly enough, Chrome. > > I don't think it's *that* weird actually. If Chrome was doing > something off-s

Re: [JSMentors] Better JSON traversal?

2011-09-19 Thread Nick Morgan
On 19 September 2011 11:56, Samuel Richardson wrote: > From memory, most browsers will keep the order intact with the exception of, > weirdly enough, Chrome. I don't think it's *that* weird actually. If Chrome was doing something off-spec then it would be weird, but the fact that the spec says th

Re: [JSMentors] Better JSON traversal?

2011-09-17 Thread Rey Bango
Ah good idea! On Sat, Sep 17, 2011 at 9:34 PM, Michal Kuklis wrote: > Hey Rey, one way to improve it would be to simplify your JSON structure a > bit for example: > var notes = {"A": {"maj7": [0, 3, 2, 0, 1, 2], "min": [0, 3, 2, 0, 1, 2]}, > "B": {"min": [0, 3, 2, 0, 1, 2]}}; > > this way you cou