xtr¶
contains¶
Array contains¶
contains(container: Array, value: Any): Boolean
Returns true if arr contains the given value, otherwise false.
Example
ResultString contains¶
contains(container: String, value: String): Boolean
Returns true if str1 contains str2, otherwise false.
Example
ResultendsWith¶
endsWith(main: String, sub: String): Boolean
Returns true if str1 ends with str2, otherwise false.
Example
Resultentries¶
entries(obj: Object[A]): Array[Object[String|A]]
Returns an Array[Object[String|A]] with one Object[String|A] for every entry in obj. The result has the form of [{ key: String, value: A }].
Example
Resultfilter¶
filter func(value)¶
filter(array: Array[A], func: Func[(A) => Boolean]): Array[A]
Returns a new Array[A] containing the elements of array that satisfy the given func, which must accept an A value to test.
Example
Resultfilter func(value, idx)¶
filter(array: Array[A], func: Func[(A, Number) => Boolean]): Array[A]
Returns a new Array[A] containing the elements of array that satisfy the given func, which must accept an A value and its Number index to test.
Example
ResultfilterNotEq¶
filterNotEq(collection: Array[A], value: B): Array[A]
Returns a new Array[A] containing the elements of arr that are not equal to the given value.
Example
ResultfilterNotIn¶
filterNotIn(first: Array[A], second: Array[B]): Array[A]
Returns a new Array[A] containing the elements of first that are not in the given second. first may also be an Object, in which case the entries whose keys are listed in second are removed.
Example
ResultfilterObject¶
filterObject func(value)¶
filterObject(array: Object[A], func: Func[(A) => Boolean]): Object[A]
Returns a new Object[A] containing the entries of array that satisfy the given func, which must accept an A value to test.
Example
local languages = {
scala: { version: '3.1.3', isJvm: true },
java: { version: '19', isJvm: true },
python: { version: '3.10.4', isJvm: false }
};
xtr.filterObject(languages, function(lang) lang.isJvm)
filterObject func(value, key)¶
filterObject(array: Object[A], func: Func[(A, String) => Boolean]): Object[A]
Returns a new Object[A] containing the entries of array that satisfy the given func, which must accept an A value and its corresponding String key to test.
Example
local languages = {
scala: { version: '3.1.3', isJvm: true },
java: { version: '19', isJvm: true },
python: { version: '3.10.4', isJvm: false }
};
xtr.filterObject(languages, function(lang, name) !lang.isJvm || name == 'scala')
filterObject func(value, key, idx)¶
filterObject(array: Object[A], func: Func[(A, String, Number) => Boolean]): Object[A]
Returns a new Object[A] containing the entries of array that satisfy the given func, which must accept an A value and its corresponding String key and Number index to test.
Example
local languages = {
scala: { version: '3.1.3', isJvm: true },
java: { version: '19', isJvm: true },
python: { version: '3.10.4', isJvm: false }
};
xtr.filterObject(languages, function(lang, name, idx) idx == 0 || name == 'python')
flatMap¶
flatMap func(value)¶
flatMap(array: Array[A], func: Func[(A) => Array[B]]): Array[B]
Returns a new Array[B] containing the elements of every Array[B] obtained by applying the given func to all elements in array. func must accept an A value.
Example
ResultflatMap func(value, idx)¶
flatMap(array: Array[A], func: Func[(A, Number) => Array[B]]): Array[B]
Returns a new Array[B] containing the elements of every Array[B] obtained by applying the given func to all elements in array. func must accept an A value and its Number index.
Example
ResultflatMapObject¶
flatMapObject func(value)¶
flatMapObject(value: Object[A], func: Func[(A) => Object[B]]): Object[B]
Returns a new Object[B] containing the entries of every Object[B] obtained by applying the given func to all entries in value. func must accept an A value.
Example
local candidateReqs = {
req1: { skillsType: 'dev', required: ['java'], preferred: ['unit-testing'] },
req2: { skillsType: 'ops', required: ['containers'], preferred: ['kubernetes'] }
};
local reqsWeight(req) = {
[req.required[0]]: 5,
[req.preferred[0]]: 2,
[if req.skillsType == 'dev' then 'github']: 4,
[if req.skillsType == 'ops' then 'jenkins']: 4
};
xtr.flatMapObject(candidateReqs, reqsWeight)
flatMapObject func(value, key)¶
flatMapObject(value: Object[A], func: Func[(A, String) => Object[B]]): Object[B]
Returns a new Object[B] containing the entries of every Object[B] obtained by applying the given func to all entries in value. func must accept an A value and its corresponding String key.
Example
local candidateReqs = {
dev: { required: ['java'], preferred: ['unit-testing'] },
ops: { required: ['containers'], preferred: ['kubernetes'] }
};
local reqsWeight(req, type) = {
[req.required[0]]: 5,
[req.preferred[0]]: 2,
[if type == 'dev' then 'github']: 4,
[if type == 'ops' then 'jenkins']: 4
};
xtr.flatMapObject(candidateReqs, reqsWeight)
flatMapObject func(value, key, idx)¶
flatMapObject(value: Object[A], func: Func[(A, String, Number) => Object[B]]): Object[B]
Returns a new Object[B] containing the entries of every Object[B] obtained by applying the given func to all entries in value. func must accept an A value and its corresponding String key and Number index.
Example
local candidateReqs = {
dev: { required: ['java'], preferred: ['unit-testing'] },
ops: { required: ['containers'], preferred: ['kubernetes'] }
};
local reqsWeight(req, type, idx) = {
[req.required[0]]: 5,
[req.preferred[0]]: if idx == 0 then 3 else 1,
[if type == 'dev' then 'github']: if idx == 0 then 4 else 2,
[if type == 'ops' then 'jenkins']: if idx == 0 then 4 else 2
};
xtr.flatMapObject(candidateReqs, reqsWeight)
flatten¶
flatten(array: Array[Array[A]]): Array[A]
Returns a new Array[A] containing the elements of every Array[A] in arr.
Example
ResultfoldLeft¶
foldLeft(arr: Array[A], init: Any, func: Func[(A, Any) => Any]): Any
From left to right in arr, applies the given func to the first element with init, then applies it to every subsequent element with the result of the previous invocation. func must accept an A value and Any value, which is init for the first invocation, and the result of the previous one for all others.
Returns the Any result of the final func invocation.
Hint
fold functions usually mutate the "accumulator" value on each invocation, thus "folding" the collection into a single value.
Example
ResultfoldRight¶
foldRight(arr: Array[A], init: Any, func: Func[(A, Any) => Any]): Any
From right to left in arr, applies the given func to the first element with init, then applies it to every subsequent element with the result of the previous invocation. func must accept an A value and Any value, which is init for the first invocation, and the result of the previous one for all others.
Returns the Any result of the final func invocation.
Hint
fold functions usually mutate the "accumulator" value on each invocation, thus "folding" the collection into a single value.
Example
ResultgroupBy¶
Array groupBy func(value)¶
groupBy(container: Array[A], func: Func[(A) => String]): Object[Array[A]]
Returns an Object[Array[A]] where the keys are the results of applying the given func to all elements in container, and their corresponding values are the container elements for which the func invocation resulted in such key. func must accept an A value.
Example
local languages = [
{ name: 'scala', version: '3.1.3', isJvm: true },
{ name: 'java', version: '19', isJvm: true },
{ name: 'python', version: '3.10.4', isJvm: false }
];
xtr.groupBy(languages, function(lang) if lang.isJvm then 'jvmLangs' else 'others')
{
jvmLangs: [
{ name: 'scala', version: '3.1.3', isJvm: true },
{ name: 'java', version: '19', isJvm: true }
],
others: [{ name: 'python', version: '3.10.4', isJvm: false }]
}
Array groupBy func(value, idx)¶
groupBy(container: Array[A], func: Func[(A, Number) => String]): Object[Array[A]]
Returns an Object[Array[A]] where the keys are the results of applying the given func to all elements in container, and their corresponding values are the container elements for which the func invocation resulted in such key. func must accept an A value and its Number index.
Example
local languages = [
{ name: 'scala', version: '3.1.3', isJvm: true },
{ name: 'java', version: '19', isJvm: true },
{ name: 'python', version: '3.10.4', isJvm: false }
];
local langFunc(lang, idx) = if idx == 0 then 'preferred'
else if lang.isJvm then 'jvmLangs'
else 'others';
xtr.groupBy(languages, langFunc)
{
preferred: [{ name: 'scala', version: '3.1.3', isJvm: true }],
jvmLangs: [{ name: 'java', version: '19', isJvm: true }],
others: [{ name: 'python', version: '3.10.4', isJvm: false }]
}
Object groupBy func(value)¶
groupBy(container: Object[A], func: Func[(A) => String]): Object[Object[A]]
Returns an Object[Object[A]] where the keys are the results of applying the given func to all elements in container, and their corresponding values are the container elements for which the func invocation resulted in such key. func must accept an A value.
Example
local languages = {
scala: { version: '3.1.3', isJvm: true, project: 'scala-lang.org' },
java: { version: '19', isJvm: true, project: 'jdk.java.net' },
python: { version: '3.10.4', isJvm: false, project: 'python.org' }
};
xtr.groupBy(languages, function(lang) if lang.isJvm then 'jvmLangs' else 'others')
{
jvmLangs: {
scala: { version: '3.1.3', isJvm: true, project: 'scala-lang.org' },
java: { version: '19', isJvm: true, project: 'jdk.java.net' }
},
others: { python: { version: '3.10.4', isJvm: false, project: 'python.org' }}
}
Object groupBy func(value, key)¶
groupBy(container: Object[A], func: Func[(A, String) => String]): Object[Object[A]]
Returns an Object[Object[A]] where the keys are the results of applying the given func to all elements in container, and their corresponding values are the container elements for which the func invocation resulted in such key.func must accept an A value and its corresponding String key.
Example
local languages = {
scala: { version: '3.1.3', isJvm: true, project: 'scala-lang.org' },
java: { version: '19', isJvm: true, project: 'jdk.java.net' },
python: { version: '3.10.4', isJvm: false, project: 'python.org' }
};
local langFunc(lang, name) = if name == 'scala' then 'preferred'
else if lang.isJvm then 'jvmLangs'
else 'others';
xtr.groupBy(languages, langFunc)
{
preferred: { scala: { version: '3.1.3', isJvm: true, project: 'scala-lang.org' }},
jvmLangs: { java: { version: '19', isJvm: true, project: 'jdk.java.net' }},
others: { python: { version: '3.10.4', isJvm: false, project: 'python.org' }}
}
indexOf¶
Array indexOf¶
indexOf(container: Array, value: Any): Number
Returns the index of the first element in container equal to the given value, or -1 if there is none.
Example
ResultString indexOf¶
indexOf(container: String, value: String): Number
Returns the index of the first occurrence of value in container, or -1 if there is none.
Example
ResultindicesOf¶
Array indicesOf¶
indicesOf(container: Array, value: Any): Array[Number]
Returns an Array[Number] with the indices of the elements in arr that equal value.
Example
ResultString indicesOf¶
indicesOf(container: String, value: String): Array[Number]
Returns an Array[Number] with the indices of the substrings in str1 that equal str2.
Example
ResultisArray¶
isArray(v: Any): Boolean
Returns true if value is an Array, otherwise false.
Example
ResultisBlank¶
isBlank(value: String): Boolean
Returns true if str is empty or contains whitespace characters only, otherwise false.
Example
ResultisBoolean¶
isBoolean(v: Any): Boolean
Returns true if value is a Boolean, otherwise false.
Example
ResultisDecimal¶
isDecimal(value: Number): Boolean
Returns true if num is a decimal, otherwise false.
Example
ResultisEmpty¶
Array isEmpty¶
isEmpty(container: Array): Boolean
Returns true if arr is empty, otherwise false.
Example
ResultObject isEmpty¶
isEmpty(container: Object): Boolean
Returns true if obj is empty, otherwise false.
Example
ResultString isEmpty¶
isEmpty(container: String): Boolean
Returns true if str is empty, otherwise false.
Example
ResultisFunction¶
isFunction(v: Any): Boolean
Returns true if value is a Function, otherwise false.
Example
ResultisInteger¶
isInteger(value: Number): Boolean
Returns true if num is an integer, otherwise false.
Example
ResultisNumber¶
isNumber(v: Any): Boolean
Returns true if value is a Number, otherwise false.
Example
ResultisObject¶
isObject(v: Any): Boolean
Returns true if value is an Object, otherwise false.
Example
ResultisString¶
isString(v: Any): Boolean
Returns true if value is a String, otherwise false.
Example
Resultjoin¶
Array[Number] join¶
join(array: Array[Number], sep: String): String
Returns a new String composed of all the elements in array separated by the sep.
Example
ResultArray[String] join¶
join(array: Array[String], sep: String): String
Returns a new String composed of all the elements in array separated by the sep.
Example
Resultkeys¶
keys(obj: Object): Array[String]
Returns an Array[String] containing all the keys in obj.
Example
ResultlastIndexOf¶
Array lastIndexOf¶
lastIndexOf(container: Array, value: Any): Number
Returns the index of the last element in container equal to the given value, or -1 if there is none.
Example
ResultString lastIndexOf¶
lastIndexOf(container: String, value: String): Number
Returns the index of the last occurrence of value in container, or -1 if there is none.
Example
Resultlength¶
Array length¶
length(arr: Array): Number
Returns the size of arr.
Example
ResultFunc length¶
length(func: Function): Number
Returns the number of func parameters.
Example
ResultObject length¶
length(obj: Object): Number
Returns the number of entries in obj.
Example
ResultString length¶
length(str: String): Number
Returns the number of characters in str.
Example
Resultmap¶
map func(value)¶
map(value: Array[A], func: Func[(A) => B]): Array[B]
Returns a new Array[B] with the results of applying func to all elements in value. func must accept an A.
Example
Resultmap func(value, idx)¶
map(value: Array[A], func: Func[(A, Number) => B]): Array[B]
Returns a new Array[B] with the results of applying func to all elements in value. func must accept an A and its Number index.
Example
ResultmapEntries¶
mapEntries func(value)¶
mapEntries(value: Object[A], func: Func[(A) => B]): Array[B]
Returns an Array[B] with the results of applying func to all entries in value. func must accept an A.
Example
local languages = {
scala: { version: '3.1.3', isJvm: true, project: 'scala-lang.org' },
java: { version: '19', isJvm: true, project: 'jdk.java.net' },
python: { version: '3.10.4', isJvm: false, project: 'python.org' }
};
xtr.mapEntries(languages, function(lang) lang.project)
mapEntries func(value, key)¶
mapEntries(value: Object[A], func: Func[(A, String) => B]): Array[B]
Returns an Array[B] with the results of applying func to all entries in value. func must accept an A and its corresponding String key.
Example
local languages = {
scala: { version: '3.1.3', isJvm: true, project: 'scala-lang.org' },
java: { version: '19', isJvm: true, project: 'jdk.java.net' }
};
xtr.mapEntries(languages, function(lang, name) {
name: name,
version: lang.version
})
mapEntries func(value, key, idx)¶
mapEntries(value: Object[A], func: Func[(A, String, Number) => B]): Array[B]
Returns an Array[B] with the results of applying func to all entries in value. func must accept an A and its corresponding String key and Number index.
Example
local languages = {
scala: { version: '3.1.3', isJvm: true, project: 'scala-lang.org' },
java: { version: '19', isJvm: true, project: 'jdk.java.net' }
};
local langFunc(lang, name, idx) = {
name: name,
[if idx == 0 then 'preferred']: true
};
xtr.mapEntries(languages, langFunc)
mapObject¶
mapObject func(value)¶
mapObject(value: Object[A], func: Func[(A) => Object[B]]): Object[B]
Returns a new Object[B] containing the entry of every Object[B] obtained by applying the given func to all entries in value. func must accept an A value, and must return an Object with a single entry; returning an Object with more than one entry is an error.
Example
ResultmapObject func(value, key)¶
mapObject(value: Object[A], func: Func[(A, String) => Object[B]]): Object[B]
Returns a new Object[B] containing the entry of every Object[B] obtained by applying the given func to all entries in value. func must accept an A value and its corresponding String key, and must return an Object with a single entry.
Example
ResultmapObject func(value, key, idx)¶
mapObject(value: Object[A], func: Func[(A, String, Number) => Object[B]]): Object[B]
Returns a new Object[B] containing the entry of every Object[B] obtained by applying the given func to all entries in value. func must accept an A value and its corresponding String key and Number index, and must return an Object with a single entry.
Example
xtr.mapObject({ scala: '3.1.3', java: '19' }, function(version, name, idx) { [name + idx]: version })
max¶
Array[Boolean] max¶
max(array: Array[Boolean]): Boolean
Returns the max Boolean in arr, with true being "bigger" than false.
Example
ResultArray[Number] max¶
max(array: Array[Number]): Number
Returns the max Number in arr.
Example
ResultArray[String] max¶
max(array: Array[String]): String
Returns the max String in arr.
Example
ResultmaxBy¶
maxBy func(_) => Boolean¶
maxBy(array: Array[A], func: Func[(A) => Boolean]): A
Returns the max A by comparing the values returned by func, which must accept an A.
Example
local languages = [
{ name: 'java', version: '19', isPreferred: false },
{ name: 'python', version: '3.1.14', isPreferred: false },
{ name: 'scala', version: '3.1.3', isPreferred: true }
];
xtr.maxBy(languages, function(lang) lang.isPreferred)
maxBy func(_) => Number¶
maxBy(array: Array[A], func: Func[(A) => Number]): A
Returns the max A by comparing the values returned by func, which must accept an A.
Example
local languages = [
{ name: 'java', version: '19', weight: 2 },
{ name: 'python', version: '3.1.14', weight: 2 },
{ name: 'scala', version: '3.1.3', weight: 4 }
];
xtr.maxBy(languages, function(lang) lang.weight)
maxBy func(_) => String¶
maxBy(array: Array[A], func: Func[(A) => String]): A
Returns the max A by comparing the values returned by func, which must accept an A.
Example
local languages = [
{ name: 'java', version: '19', score: 'B' },
{ name: 'python', version: '3.1.14', score: 'B' },
{ name: 'scala', version: '3.1.3', score: 'S' }
];
xtr.maxBy(languages, function(lang) lang.score)
min¶
Array[Boolean] min¶
min(array: Array[Boolean]): Boolean
Returns the min Boolean in arr, with false being "smaller" than true.
Example
ResultArray[Number] min¶
min(array: Array[Number]): Number
Returns the min Number in arr.
Example
ResultArray[String] min¶
min(array: Array[String]): String
Returns the min String in arr.
Example
ResultminBy¶
minBy func(_) => Boolean¶
minBy(array: Array[A], func: Func[(A) => Boolean]): A
Returns the min A by comparing the values returned by func, which must accept an A.
Example
local languages = [
{ name: 'java', version: '19', isPreferred: false },
{ name: 'python', version: '3.1.14', isPreferred: false },
{ name: 'scala', version: '3.1.3', isPreferred: true }
];
xtr.minBy(languages, function(lang) lang.isPreferred)
minBy func(_) => Number¶
minBy(array: Array[A], func: Func[(A) => Number]): A
Returns the min A by comparing the values returned by func, which must accept an A.
Example
local languages = [
{ name: 'java', version: '19', weight: 2 },
{ name: 'python', version: '3.1.14', weight: 2 },
{ name: 'scala', version: '3.1.3', weight: 4 }
];
xtr.minBy(languages, function(lang) lang.weight)
minBy func(_) => String¶
minBy(array: Array[A], func: Func[(A) => String]): A
Returns the min A by comparing the values returned by func, which must accept an A.
Example
local languages = [
{ name: 'java', version: '19', score: 'B' },
{ name: 'python', version: '3.1.14', score: 'B' },
{ name: 'scala', version: '3.1.3', score: 'S' }
];
xtr.minBy(languages, function(lang) lang.score)
parseNum¶
parseNum(str: String): Number
Returns the Number representation of the given str.
Example
ResultsortBy¶
sortBy also accepts an Object as value, sorting its entries. In both cases func may take a second parameter: the element's Number index for arrays, or the entry's String key for objects.
sortBy func(_) => Boolean¶
sortBy(value: Array[A], func: Func[(A) => Boolean]): Array[A]
Returns a new Array[A] with the contents of value sorted by comparing the values returned by func, which must accept an A.
Example
local languages = [
{ name: 'java', version: '19', isPreferred: false },
{ name: 'scala', version: '3.1.3', isPreferred: true },
{ name: 'python', version: '3.1.14', isPreferred: false }
];
xtr.sortBy(languages, function(lang) lang.isPreferred)
[
{ name: 'java', version: '19', isPreferred: false },
{ name: 'python', version: '3.1.14', isPreferred: false },
{ name: 'scala', version: '3.1.3', isPreferred: true }
]
sortBy func(_) => Number¶
sortBy(value: Array[A], func: Func[(A) => Number]): Array[A]
Returns a new Array[A] with the contents of value sorted by comparing the values returned by func, which must accept an A.
Example
local languages = [
{ name: 'java', version: '19', weight: 3 },
{ name: 'scala', version: '3.1.3', weight: 4 },
{ name: 'python', version: '3.1.14', weight: 2 }
];
xtr.sortBy(languages, function(lang) lang.weight)
[
{ name: 'python', version: '3.1.14', weight: 2 },
{ name: 'java', version: '19', weight: 3 },
{ name: 'scala', version: '3.1.3', weight: 4 }
]
sortBy func(_) => String¶
sortBy(value: Array[A], func: Func[(A) => String]): Array[A]
Returns a new Array[A] with the contents of value sorted by comparing the values returned by func, which must accept an A.
Example
local languages = [
{ name: 'java', version: '19', score: 'B' },
{ name: 'scala', version: '3.1.3', score: 'S' },
{ name: 'python', version: '3.1.14', score: 'B' }
];
xtr.sortBy(languages, function(lang) lang.score)
[
{ name: 'java', version: '19', score: 'B' },
{ name: 'python', version: '3.1.14', score: 'B' },
{ name: 'scala', version: '3.1.3', score: 'S' }
]
range¶
range(begin: Number, end: Number): Array[Number]
Returns an Array[Number] containing numbers from first to last.
Example
Resultread¶
read mediaType¶
read(data: String, mimeType: String): Any
Parses the data as the given mimeType using the data format plugins available to the Transformer.
Example
Resultread mediaType, params¶
read(data: String, mimeType: String, params: Object): Any
Parses the data as the given mimeType and params options using the data format plugins available to the Transformer.
Example
ResultreadUrl¶
readUrl mediaType¶
readUrl(url: String, mimeType: String): Any
Retrieves the data at url and parses it as the given mimeType. Supported schemes/protocols are http, https, classpath, and file.
Asumming example.com returns <hello>world!</hello>:
Example
ResultreadUrl mediaType, params¶
readUrl(url: String, mimeType: String, params: Object): Any
Retrieves the data at url and parses it as the given mimeType with params options. Supported schemes/protocols are http, https, classpath, and file.
Asumming example.com returns <hello>world!</hello>:
Example
ResultrmKey¶
rmKey(collection: Object[A], value: String): Object[A]
Returns a new Object[A] containing the entries of obj minus the entry whose key equals the given value.
Example
ResultrmKeyIn¶
rmKeyIn(first: Object[A], second: Array[String]): Object[A]
Returns a new Object[A] containing the entries of obj minus the entries whose key is in the given arr.
Example
Resultreplace¶
replace(str1: String, str2: String, replacement: String): String
Returns a new String with the contents of str1, with occurrences of str2 replaced by replacement.
Example
Resultreverse¶
Array reverse¶
reverse(collection: Array): Array
Returns a new Array with the elements of arr in reversed order.
Example
ResultObject reverse¶
reverse(collection: Object): Object
Returns a new Object with the entries of obj in reversed order.
Example
ResultString reverse¶
reverse(collection: String): String
Returns a new String with the characters of str in reversed order.
Example
Resultsplit¶
split(str1: String, str2: String): Array[String]
Returns an Array[String] containing the chunks of str1 split by the contents of str2.
Example
ResultstartsWith¶
startsWith(str1: String, str2: String): Boolean
Returns true if str1 starts with str2.
Example
ResulttoLowerCase¶
toLowerCase(str: String): String
Returns the lowercase representation of str.
Example
ResulttoString¶
toString(value: Any): String
Returns the String representation of value.
Example
ResulttoUpperCase¶
toUpperCase(str: String): String
Returns the uppercase representation of str.
Example
Resulttrim¶
trim(str: String): String
Returns a new String with the contents of str removed of leading and trailing whitespaces.
Example
Resulttype¶
type(value: Any): String
Returns the String name of the type of value.
Example
local func(it) = it;
{
bool: xtr.type(true),
num: xtr.type(365),
nil: xtr.type(null),
arr: xtr.type([]),
obj: xtr.type({}),
func: xtr.type(func)
}
uuid¶
uuid(): String
Generates a new random UUID v4 String.
Example
Resultvalues¶
values(obj: Object[A]): Array[A]
Returns an Array[A] containing all the values in obj.
Example
Resultwrite¶
write mediaType¶
write(data: Any, mimeType: String): String
Writes the data in the given mimeType format using the data format plugins available to the Transformer.
Example
Resultwrite mediaType, params¶
write(data: Any, mimeType: String, params: Object): String
Writes the data in the given mimeType format and params options using the data format plugins available to the Transformer.
Example
Result