JSON_ARRAY_* Constant Group

From NWN Lexicon
Jump to: navigation, search
Nwnee logo.jpg Note: This article documents Neverwinter Nights: Enhanced Edition new content or changes/updates/fixes to 1.69 functions. These are all listed under the category and patches pages.
Used by JsonArrayTransform to determine what transformation to perform.

Constants

Constant Value Description
JSON_ARRAY_SORT_ASCENDING 1 Sorting is dependent on the type and follows json standards (.e.g. 99 < "100").
JSON_ARRAY_SORT_DESCENDING 2 Sorting is dependent on the type and follows json standards (.e.g. 99 < "100").
JSON_ARRAY_SHUFFLE 3 Randomises the order of elements.
JSON_ARRAY_REVERSE 4 Reverses the array.
JSON_ARRAY_UNIQUE 5 Returns a modified copy of jArray with duplicate values removed. Coercable but different types are not considered equal (e.g. 99 != "99"); int/float equivalence however applies: 4.0 == 4. Order is preserved.
JSON_ARRAY_COALESCE 6 Returns the first non-null entry. Empty-ish values (e.g. "", 0) are not considered null, only the json scalar type.

Version

This constants group was added in 1.86.8193.34 of NWN:EE.

See Also

functions: JsonArrayTransform