1.6 KiB
1.6 KiB
title | description | menu | weight | introduced | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
experimental.objectKeys() function | `experimental.objectKeys()` returns an array of property keys in a specified record. |
|
101 | 0.40.0 |
experimental.objectKeys()
returns an array of property keys in a specified record.
Function type signature
(o: A) => [string] where A: Record
{{% caption %}} For more information, see Function type signatures. {{% /caption %}}
Parameters
o
({{< req >}}) Record to return property keys from.
Examples
Return all property keys in a record
import "experimental"
user = {firstName: "John", lastName: "Doe", age: 42}
experimental.objectKeys(o: user)// Returns [firstName, lastName, age]