MarkLogic 10 Product Documentation
map:new

map:new(
   [$maps as map:map*]
) as map:map

Summary

Constructs a new map by combining the keys from the maps given as an argument. If a given key exists in more than one argument map, the value from the last such map is used.

Parameters
maps The argument maps.

Example

  map:new(())
  => map:map(<map xmlns="http://marklogic.com/xdmp/map"/>)

Example

<result>{
  map:new((
    map:entry("a","aardvark"),
    map:entry("b","badger")
  ))
}</result>

=>
<result>
  <map:map xmlns:map="http://marklogic.com/xdmp/map" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <map:entry key="b">
      <map:value xsi:type="xs:string">badger</map:value>
    </map:entry>
    <map:entry key="a">
      <map:value xsi:type="xs:string">aardvark</map:value>
    </map:entry>
  </map:map>
</result>
Powered by MarkLogic Server | Terms of Use | Privacy Policy