I have a graph of schema:ProductGroup and schema:ProductModel nodes, and I've written a frame to output it in a nested structure, conceptually similar to the library-book-chapter examples. Everything works, except that the framed output includes a isVariantOf: null
on the top-level ProductGroup
, which I'd rather not have.
{
"@context": {
"@vocab": "http://schema.org/",
"ex": "http://example.com/"
},
"@id": "ex:100",
"@type": "ProductGroup",
"hasVariant": [...],
"isVariantOf": null,
"name": "All The Things"
}
Full example in JSON-LD Playground (toggle between something like Flattened and Framed to get it to output correctly).
The top-level ProductGroup
doesn't have an isVariantOf
property. In my framing document, I'm matching on this being empty. But, I can't figure out how to omit the empty isVariantOf
property in the output. I think I have to set the @omitDefault
flag, but I'm having trouble figuring out where or how.
{
"@context": {
"@vocab": "http://schema.org/",
"ex": "http://example.com/"
},
"@graph": {
"@type": "ProductGroup",
"@requireAll": true,
"isVariantOf": []
}
}