Converts a tuple to a key-value/JSON object.
type:
out = TUPLETOKEYVALUE({type='KEYVALUEOBJECT'}, in)