Dynamics Connector 12.11

# assign

The `assign` method adds an attribute (a name/value pair) to the object.

## Syntax

    assign (name, value)

## Arguments

Argument | Description
--- | ---
`name` | (string) The name of the attribute to add.
`value` | (lua_json_type) The value of the attribute to add. This can be a Boolean, float, integer, string, LuaJsonArray, LuaJsonObject, LuaJsonValue, or nil.

## Example

    local myJsonObject = LuaJsonObject:new( { name1="value1" , name2="value2" } )
    myJsonObject:assign("name3", "value3")
    myJsonObject:assign("name4", LuaJsonArray:new("value4a","value4b") )

© Copyright 2022 Micro Focus or one of its affiliates
Version 12.11 | Last updated February 2022

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL Dynamics Connector 12.11

Topic Title: assign