Data Types in AJAX Toolkit
The AJAX Toolkit returns all data as strings. If needed, you can convert the data into an appropriate datatype by using one of the functions supplied with the returned object.
getDatemaps dates to JavaScript Date.getDateTimemaps dateTime values to JavaScript Date.getIntmaps integer values to JavaScript Int.getFloatmaps float values to JavaScript Float.getBooleanmaps boolean values to JavaScript Boolean.getArrayretrieves arrays of values.getBase64Binaryreturns the decoded value of a Base64 binary encoded string. This is typically used for working with documents and attachments. See Working with Base64 Binary Encoded Strings for more information.
If you request a field whose value is null in a query, the returned value will be null. If you do not request a field, whether the value is null or not, the value is not returned, and is therefore undefined.