json.isSubset: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Conversion script moved page Json.isSubset to json.isSubset: Converting page titles to lowercase)
No edit summary
 
Line 7: Line 7:


|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
json.isSubset(firstArray, array, array, ...)
json.isSubset(firstArray, array, array, ...)
</source>
</syntaxhighlight>
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
json.isSubset(firstObject, object, object, ...)
json.isSubset(firstObject, object, object, ...)
</source>
</syntaxhighlight>
'''Parameters'''
'''Parameters'''
{{param|firstArray|The [[JSON Array]] that must contain all of the values of the subsequent [[JSON Array]]s for this function to return {{true}}.}}
{{param|firstArray|The [[JSON Array]] that must contain all of the values of the subsequent [[JSON Array]]s for this function to return {{true}}.}}

Latest revision as of 17:40, 15 March 2023

 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.

json.isSubset() Function

Introduced in version 1.3b53
Returns true(1) if all of the JSON Object keys or JSON Array values are contained within the first JSON Object or JSON Array.

Usage

json.isSubset(firstArray, array, array, ...)
json.isSubset(firstObject, object, object, ...)

Parameters

  • firstArray - The JSON Array that must contain all of the values of the subsequent JSON Arrays for this function to return true(1).
  • array - A JSON Array with values that are tested to be within the firstArray.
  • firstObject - The JSON Object that must contain all of the keys of the subsequent JSON Objects for this function to return true(1).
  • object - A JSON Object with keys that are tested to be within the firstObject.


See Also