ort.valueCount( value as ort.value ) as (Number|String)
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".
|
const m = ort.map(ort.string(["key1", "key2"],[2]),ort.value([1,2],[2],"float")) ort.valueCount(m) => 2
const s = ort.sequence([ort.value([2,3],[2],"float"),ort.value([1],[1],"float"),ort.value([2],[1],"float")]) ort.valueCount(s) => 3
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.