在 Schema.org JSON-LD 中使用多个相同种类的项目

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

我正在尝试使用结构化数据来指定多个组织(见下文)。但是Google的结构化数据测试工具只能识别每种类型的第一项。

如何列出多个 alumniOf 项?

<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>

您可以列出多个 alumniOf 项,只需像这样放置即可:

<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>

在这里测试。 https://search.google.com/structured-data/testing-tool