Lists key-value pairs (entries) present in the given object.

Type signature

ObjectEntries

Examples

entries({ a: 1, b: 2, c: 3 });
// ⇒ [["a", 1], ["b", 2], ["c", 3]]
Try in REPL

Questions

  • How to get entries of an object?
  • How to get an array of key-value pairs of an object?

TypeScript sourceJavaScript source