I\'ve just started using jquery and I\'m really enjoying using selectors. It occurs to me that the idiom would be a very nice way to traverse object trees (e.g., JSON query resu
The array object has some methods that you can use:
last = obj.child.baz.slice(-1)[0];
Some other examples:
first = obj.child.baz.slice(0,1)[0]; allExceptFirst = obj.child.baz.slice(1); allExceptLast = obj.child.baz.(0,-1);