gameValueToJson

From Bohemia Interactive Community
Revision as of 18:38, 7 December 2023 by Lou Montana (talk | contribs) (Add jsonToGameValue to seeAlso)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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:
_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