Query objects, added class and test from post

Class: https://gist.github.com/createbang/1b6e9ee22e12410be46d#file-queryobjects3-js
Test: https://gist.github.com/createbang/59011114a48fb7f2900b#file-queryobjects-test-js