Category: Objects Kind: Operation Description: Parse a string into an object
Name | Abbreviation | Type | Access | Description |
---|---|---|---|---|
String | S | String | Item | The string to parse |
Name | Abbreviation | Type | Access | Description |
---|---|---|---|---|
Object | O | Any | Item | The parsed object |
In JSON (JavaScript Object Notation), an object is a collection of key-value pairs.
It’s wrapped in curly braces { }
, and each key-value pair inside it follows this format:
json
CopyEdit
"key": value
Here’s a JSON object representing a property listing:
json
CopyEdit
{
"address": "123 Maple Street",
"price": 450000,
"bedrooms": 3,
"bathrooms": 2,
"square_feet": 1800,
"status": "For Sale"
}
{ }
) is a JSON object."address"
is the key, "123 Maple Street"
is the value (a string)."price"
is the key, 450000
is the value (a number).{ ... }
= object (key-value pairs)[ ... ]
= array (Lists of values or objects)json
CopyEdit
{
"listings": [
{
"address": "123 Maple Street",
"price": 450000
},
{
"address": "456 Oak Avenue",
"price": 525000
}
]
}
"listings"
is a key.