Search code examples
seoschema.orgjson-ld

Using multiple items of the same kind in Schema.org JSON-LD


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>

Solution

  • 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