JS: List Properties

By Xah Lee. Date: . Last updated: .

Object to Array

To list properties of a object, use one of the following methods.

Properties to Array
MethodEnumerable keys onlyinclude Symbol keyinclude string key
Object.keys no
Object.values no
Object.entries no
Object.getOwnPropertyNames no no
Object.getOwnPropertySymbols no no
Reflect.ownKeys no

Array-Like Object to Array

Iterable Object to Array

JavaScript, Property

BUY ΣJS JavaScript in Depth

JavaScript, List Object Properties (to Array)