added orderBy for querying items

also fixed bug where JSONProperty types weren't being reported correctly