Ad

Using Multiple Items Of The Same Kind In Schema.org JSON-LD

- 1 answer

I'm trying to use structured data to specify multiple organizations (see below). But Google's structured data testing tool only recognizes the first item of each type.

How can I list multiple alumniOf items?

<script type="application/ld+json">
  {
    "@context": "http://schema.org",
    "@type": "Organization",
    "name": "My Org",
    "founder": {
      "@type": "Person",
      "name":"Me",
      "alumniOf":{
        "@type": "Organization",
        "name": "My Org 1"
      },
      "alumniOf":{
        "@type": "Organization",
        "name": "My Org 2"
      }

  }
</script>
Ad

Answer

You can list multiple alumniOf items simply by putting them like this:

<script type="application/ld+json">
{
    "@context": "http://schema.org",
    "@type": "Organization",
    "name": "My Org",
    "founder": {
        "@type": "Person",
        "name":"Me",
        "alumniOf": [
            {
                "@type": "Organization",
                "name": "My Org 1"
            },
            {
                "@type": "Organization",
                "name": "My Org 2"
            }
        ]
    }
}
</script>

Tested here. https://search.google.com/structured-data/testing-tool

Ad
source: stackoverflow.com
Ad