Andrew H
Andrew H

Reputation: 95

how to get schema.org multiple keys for award category

I am trying to create a schema.org in ld+json and I have all the data working so far.

I am trying to create an array for the award field for a person so I can list multiple awards.

If I do "award" : "some award" as a solo item it works. But I am having trouble creating multiple awards.

I have tried

"award": [ { "@type" : "award", "name" : "award name" } ]

But I get a validation error that award is not a known valid target type for the award property.

I have checked out schema.org and tried looking it up online, but have not found anything helpful.

Has anyone had any experience with getting this to work?

Upvotes: 1

Views: 465

Answers (1)

traynor
traynor

Reputation: 8717

according to award's docs:

Values expected to be one of these types

Text

so, there's no @type, just plain text, so you can try listing awards as strings in an array:

{
  "@context": "https://schema.org",
  "@type": "Person",
  "award": ["Award", "Another award", "And another one"]
}

Upvotes: 1

Related Questions