MarkLogic Server 11.0 Product Documentation
ort.valueCount

ort.valueCount(
   value as ort.value
) as (Number|String)

Summary

Returns the number of ort.value in an ort.value with value type "SEQUENCE", and always return 2 for "MAP".

Parameters
value An ort.value, with value type "SEQUENCE" or "MAP".

Example

  const m = ort.map(ort.string(["key1", "key2"],[2]),ort.value([1,2],[2],"float"))
  ort.valueCount(m)
  =>
  2

Example

  const s = ort.sequence([ort.value([2,3],[2],"float"),ort.value([1],[1],"float"),ort.value([2],[1],"float")])
  ort.valueCount(s)
  =>
  3
Powered by MarkLogic Server | Terms of Use | Privacy Policy