We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Pick an arbitrary key.
Similar: keys, has, randomKey. Similar: keys, values, entries.
function randomKey(x, fr) // x: an object // fr: random number generator ([0, 1))
const object = require('extra-object'); var x = {a: 1, b: 2, c: 3}; object.randomKey(x); // → 'c' object.randomKey(x); // → 'b'