json.difference: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
(Tweaking page layout and typography, fixed usage duplication)
Line 11: Line 11:
</source>
</source>
<source lang="mtmacro" line>
<source lang="mtmacro" line>
json.difference(array, array, ...)
json.difference(object, object, ...)
</source>
</source>
'''Parameter'''
'''Parameter'''
{{param|array|A [[JSON Array]] to get the difference of.}}
{{param|array|A [[JSON Array]] to get the difference of.}}
{{param|object|A [[JSON Object]] to get the difference of.}}
{{param|object|A [[JSON Object]] to get the difference of.}}
 
|example=
So per example
So per example:
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[json.difference(array2, array1)]
[json.difference(array2, array1)]
</source>
</source>
will result in array2 from which all elements that are found in array1 are removed.  
will result in {{code|array2}} from which all elements that are found in {{code|array1}} are removed.  


|also=
|also=

Revision as of 17:36, 31 October 2012

 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.

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