Sub topic 6
Describing related things by nesting
This chapter assumes you can write a basic JSON-LD object with @context and @type. It also assumes you know how schema.org properties take values. Here you will learn how to describe one thing inside another.
Why nest
A page rarely describes a single isolated thing. An article has an author. A product has an offer. An offer has a price. Each of these is its own entity with its own type and properties.
In JSON-LD you express this by placing an object as the value of a property. The inner object is a nested entity. It needs its own @type, but it does not repeat @context. The context from the outer object applies to everything inside it.
A worked example
This Article has a nested Person as its author.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "How to Brew Cold Coffee",
"datePublished": "2026-03-14T08:00:00+00:00",
"image": "https://example.com/images/cold-coffee.jpg",
"author": {
"@type": "Person",
"name": "Ana Torres",
"url": "https://example.com/authors/ana"
}
}
</script>The property author does not hold a string here. It holds a Person object. The name and url inside it describe Ana, not the article. The article's own headline stays at the outer level.
Nesting more than one level
Nesting can go deeper. A Product has offers, and the Offer holds the price details.
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Stainless Steel Pour-Over Kettle",
"image": "https://example.com/images/kettle.jpg",
"description": "A 1-liter gooseneck kettle for pour-over coffee.",
"offers": {
"@type": "Offer",
"price": "39.90",
"priceCurrency": "EUR",
"availability": "https://schema.org/InStock",
"url": "https://example.com/products/kettle"
}
}Read it from the outside in: a Product that has an Offer, and the Offer has a price in euros and an availability. The price is a string of digits with a period as the decimal separator. The availability value is a schema.org URL that names an enumeration member.
One value or several
Many properties accept more than one value. Use an array of objects to give several nested entities.
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "How to Brew Cold Coffee",
"author": [
{ "@type": "Person", "name": "Ana Torres" },
{ "@type": "Person", "name": "Luis Pérez" }
]
}Common errors
- Missing
@typeon the inner object. Without it, a consumer cannot tell what the nested object is. - Repeating
@contextin every nested object. It is allowed but unnecessary. It adds noise. - Using a string where an entity is better.
"author": "Ana Torres"is valid, but you cannot attach aurlto it. Use a Person when you have more to say. - Putting a property on the wrong level. If
pricesits on the Product instead of the Offer, it is not read as the offer's price. - Nesting a type the property does not expect. Check the property's expected types on schema.org before you choose.
Check your understanding
Exercise
A Product page needs the product name and an Offer with price "12.00" in USD. In which object do price and priceCurrency belong, and what property of the Product holds that object?
Show answer
price and priceCurrency belong in the nested Offer object ("@type": "Offer"). The Product holds that object in its offers property. The Product itself only carries name and the other product details.
Exercise
Why might "author": {"@type": "Person", "name": "Ana Torres", "url": "https://example.com/authors/ana"} be better than "author": "Ana Torres"?
Show answer
The nested Person lets you attach more properties to the author, such as url. It also tells a consumer that the author is a person, not just a piece of text.