Category: Objects Kind: Operation Description: Get the entries of an object as a list
Name | Abbreviation | Type | Access | Description |
---|---|---|---|---|
Object | O | Object | Item | The object to get the entries of |
Name | Abbreviation | Type | Access | Description |
---|---|---|---|---|
List | L | Any | List | The entries of the object |
A key-value pair is a fundamental concept in programming and data storage, especially in dictionaries, maps, JSON, and databases.
A key-value pair consists of:
Think of a dictionary (the book):
If you look up the key "apple"
in the dictionary, the value might be "a fruit that grows on trees"
.
Take, for example, a real estate listing. It might be stored like this:
property_listing = {
"address": "123 Maple Street",
"price": 450000,
"bedrooms": 3,
"bathrooms": 2,
"square_feet": 1800,
"status": "For Sale"
}
Breakdown of key-value pairs:
KEY | VALUE |
---|---|
address | 123 Maple Street |
price | 450000 |
bedrooms | 3 |
bathrooms | 2 |
square_feet | 1800 |
status | For Sale |
Each key describes a property attribute, and each value holds the actual data about it.
This kind of structure is super common in databases, and APIs—makes it easy to store, access, and filter lists.
Object entries refer to the key-value pairs within an object. In JavaScript (and similar structures like JSON), these are called entries because each one is a single unit of information: a key and its corresponding value.
Let’s say you have a JavaScript object:
javascript
CopyEdit
const property = {
address: "123 Maple Street",
price: 450000,
bedrooms: 3
};
The entries of this object are:
["address", "123 Maple Street"]
["price", 450000]
["bedrooms", 3]
Feed in an object
This could be from construct object or the result of almost any node that creates Objects
The result is a list of the object’s entries (or key-value pairs)
The process a list of objects, use map.