object
object
Function
Convert the value to an object.
Syntax
object(value)
Parameters
| Parameters | Type | Required | Default value | Description |
|---|---|---|---|---|
| value | Any | No | None | The value to convert. |
Return value
| Type | Description |
|---|---|
| Object | Returns the object value. |
Example
result = object(['A', 'B']) // Output: {"0":"A","1":"B"} print result
Notes
- The array will have subscripted strings as keys.
- Non-object, non-array values will be put into the value field.