json.removeFirst

From RPTools Wiki
Revision as of 20:01, 27 August 2018 by Phergus (talk | contribs) (Created page with "{{MacroFunction |name=json.removeFirst |proposed=false |trusted=false |version=1.4.0.3 |description:Is similar to json.difference() but will only remove the first occurrence o...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

json.removeFirst() Function

Introduced in version 1.4.0.3

Usage

json.removeFirst(array1, array2)

Parameters

  • array1 - A JSON array.
  • array2 - A JSON array.

Compares the 2nd array with the first array and removes the first element from the first array matching an element in the second.

Example:

[json.removeFirst('[2,2,4,5,6,6,4]', '[2,6]')] => [2,4,5,6,4]


See Also