Object methods

.keys()

Return the list of all 1st-level properties in the target object.
1
object.keys() => Array[String]
2
3
// example
4
do val = { "toto": 1, "tutu": 2 }
5
do val.keys() // ["toto", "tutu"]
Copied!

.values()

Return the list of all 1st-level-property values in the target object.
1
object.values() => Array[String]
2
3
// example
4
do val = { "toto": 1, "tutu": 2 }
5
do val.values() // [1, 2]
Copied!

.remove(String)

Remove the given property from the target object.
1
object.remove("property") => void
2
3
// example
4
do val = { "toto": 1, "tutu": 2 }
5
do val.remove("toto") // { "tutu": 2 }
Copied!

.length()

Return the number of 1st-level properties in the target object.
1
object.length() => Integer
2
3
// example
4
do val = { "toto": 1, "tutu": 2 }
5
do val.length() // 2
Copied!

Last modified 1yr ago
Export as PDF
Copy link