gameValueToJson

From Bohemia Interactive Community
Jump to navigation Jump to search
Hover & click on the images for description

Description

Description:
Generate a JSON string from the provided array values.
Groups:
Argo

Syntax

Syntax:
gameValueToJson data
Parameters:
data: Array of Arrays format [[key, value], [key, value], ...]
Return Value:
String - a JSON string or an empty string if data is not an array

Examples

Example 1:
Copy
_json = gameValueToJson [["ID", 42], ["Message", "Hello there!"], ["HasHighGround", true]];
result:
{
	"ID": 42,
	"Message": "Hello there!",
	"HasHighGround": true
}

Additional Information

See also:
jsonToGameValue toString str parseSimpleArray

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note