type

Specifies the type of the data field. Can be one of:

Type Description
String The value is converted to string regardless of its original type.
Number The value is converted to number using parseFloat.
Date The value is converted to a Date object using new Date([value]).
Boolean The value is converted to Boolean using !!value (double-negation operator). If the value is the string literal "true" or "false", the respective literal value is used to represent a Boolean value.

If the specified type is different from the original type of the field value, a conversion will be attempted. If the conversion is successful, the converted field value is set, otherwise the original field value is kept.