structured-data-testing-tool
structured-data-testing-tool copied to clipboard
How to test nested Object
Describe the bug Given we have this structured data:
{
Product: [
{ name: "p1", "offers": [ {"@type": "Offer", "name": "p1o1"}, {"@type": "Offer", "name": "p1o2"} ] },
{ name: "p2", "offers": [ {"@type": "Offer", "name": "p2o1"}, {"@type": "Offer", "name": "p2o2"} ] },
]
}
Question:
How can I define the preset for testing Product[*].offers[*].name
are exist for all
For example the schema: https://schema.org/offers
Thanks! I don't have an answer for you right now and it will be probably be a little while before there is one, but use cases like this are helpful.
There is some work on going for more complex models and all examples of things that are not caught yet (but should be) will be added as tests.