json.difference: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Added a further explaination for what difference does, and added a link to json.intersection)
m (typo fix)
Line 26: Line 26:
{{func|json.union}},  
{{func|json.union}},  
{{func|json.merge}},
{{func|json.merge}},
{{func|json.interesction}}
{{func|json.intersection}}


}}
}}


[[Category:JSON Function]]
[[Category:JSON Function]]

Revision as of 08:00, 10 July 2013

 This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.
 This article needs: Examples of usage, clearer description.

json.difference() Function

Introduced in version 1.3b53
Returns an array with the differences of all of the JSON Object keys, or JSON Array values. Output contains keys or values which exist in the first parameter, but do not exist in any others.

Usage

json.difference(array, array, ...)
json.difference(object, object, ...)

Parameter

Example

So per example:
[json.difference(array2, array1)]
will result in array2 from which all elements that are found in array1 are removed.

See Also