Improved get function in jsonobject