← TechnologyThe essentials of

Object.entries(): properties as a list of pairs

Publisher: ResumeMaker • 1 source

Published: 22 Oct 2026 13:13 · Updated: 22 Oct 2026 13:13

AI source check: 21 Oct 2026 10:06. This is not editorial approval.

In a few sentences

In brief

Object.entries() converts its own enumerable text properties into pairs. This makes the crawling of settings clearer.

Useful to know

When you need to go through the names and values of settings , Object.entries() returns an array of pairs [key, value]. Included are own enumerable properties with text keys, rather than all possible properties along the inheritance chain. [1]

In const options = {theme: 'dark', pageSize: 12};, the expression Object.entries(options) gives [['theme', 'dark'], ['pageSize', 12]]. You can iterate over the result with for (const [key, value] of Object.entries(options)) and use the two parts separately.

This is convenient for building a list of settings or converting values. It is not proof that the object is suitable for public display. If it contains secret or service fields, first select the allowed keys.

With objects with numeric-looking names, the order has separate rules. Do not use Object.entries() as a promise of an arbitrary business order; when the order is substantial, save it prominently in an array of records.

Sources

For further detail and to check the information:

  1. [1] MDN — Object.entries ↗