experimental.objectKeys() function
The experimental.objectKeys()
function is subject to change at any time.
By using this function, you accept the risks of experimental functions.
The experimental.objectKeys()
function returns an array of keys in a specified record.
import "experimental"
experimental.objectKeys(
o: {key1: "value1", key2: "value2"}
)
// Returns [key1, key2]
Parameters
o
The record to return keys from.
Examples
Return all keys in a record
import "experimental"
user = {firstName: "John", lastName: "Doe", age: 42}
experimental.objectKeys(o: user)
// Returns [firstName, lastName, age]
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for Flux and this documentation. To find support, use the following resources:
InfluxDB Cloud customers can contact InfluxData Support.