3

Adding additional entries when a business has more than one phone number or emails, etc., how do you do this in a json-ld file?

It works fine in html, but when I add a second item in json and run it through the validator it return the last one entry, i.e., if I list three phone numbers it return last number.

Jason
  • 462
  • 1
  • 9
  • 23
  • Possible duplicate of [JSON-LD Schema.org: Multiple video/image page](http://stackoverflow.com/questions/30505796/json-ld-schema-org-multiple-video-image-page) – unor Mar 21 '17 at 00:08
  • Thanks, but I don't see an answer to my question in that post. – Jason Mar 21 '17 at 03:37
  • The very first code snippet in my answer should answer it, no? It shows how you can provide multiple values for a property in JSON-LD. – unor Mar 21 '17 at 12:43

2 Answers2

4

You have to define for example "Telephone" in this way :

{
    "@context": "http://schema.org",
    "@type": "Example",
    "email": "mailto:example@example.com",
    "telephone": [
        "+123456789",
        "+987654321"
   ]
}

You check your Schema with Google tool checker

Hamed
  • 565
  • 3
  • 17
0

It's note a valid code, you forget to add "," to the last line for phone tags :

{
    "@context": "http://schema.org",
    "@type": "Example",
    "email": "mailto:example@example.com",
    "telephone": [
        "+123456789",
        "+987654321"
   ],
}
TaghaBoy
  • 23
  • 8