Changes

Jump to navigation Jump to search
708 bytes added ,  17:38, 11 October 2016
no edit summary
| '''Examples'''
|{{Code|map:entry("M", "Monday")}} creates <code>map { "M": "Monday" }</code>.
|}
 
==map:find==
 
{{Mark|Introduced with Version 8.6:}}
 
{| width='100%'
| width='120' | '''Signatures'''
|{{Func|map:find|$input as item()*, $key as xs:anyAtomicType|array(*)}}
|-
| '''Summary'''
| Returns all values of maps in the supplied {{Code|$input}} with the specified {{Code|$key}}. The found values will be returned in an array. Arbitrary input will be processed recursively as follows:
* In a sequence, each item will be processed in order.
* In an array, all array members will be processed as sequence.
* In a map, all entries whose keys match the specified key. Moreover, all values of the map will be processed as sequence.
|-
| '''Examples'''
|
* {{Code|map:find(map { 1:2 }, 1)} returns {{Code|2}}.
* {{Code|map:find(map { 1: map { 2: map { 3: 4 } } }, 3)} returns {{Code|4}}.
|}
;Version 8.6
* UpdatedAdded: <code>[[#map:mergefind|map:mergefind]] signature extended with options argument. By default, value of first key is now adopted.
;Version 8.4
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu