I am tasked to optimized our clients website using structured data (JSON-LD) to be search engine friendly. Our client's business has multiple locations and I am wondering if using the location
property to structure the different business location is correct. Or should I just mark up each location separately?
Here is a sample code of what I did (although validating this using the Google structured data testing tool results in All good, I'm wondering if I am using the location
property correctly)
Also, I remove some of the properties to make the code small and replace the values with generic values:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Attorney",
"name" : "Example Injury Lawyer",
"url": "http://example.com/",
"logo": "http://example.com/assets/images/logo.png",
"location": [{
"@type": "Attorney",
"@id": "http://example.com/offices/city-injury-lawyer",
"name": "Example Injury Lawyer",
"url": "http://example.com/offices/city-injury-lawyer",
"telephone": "+1-555-555-5555",
"address": {
"@type": "PostalAddress",
"streetAddress": "Street Address",
"addressLocality": "City",
"addressRegion": "Region",
"postalCode": "12345",
"addressCountry": "US"
}
}, {
"@type": "Attorney",
"@id": "http://example.com/offices/another-city-injury-lawyer",
"name": "Example Injury Lawyer",
"url": "http://example.com/offices/another-city-injury-lawyer",
"telephone": "+1-333-333-3333",
"address": {
"@type": "PostalAddress",
"streetAddress": "Street Address",
"addressLocality": "City",
"addressRegion": "Region",
"postalCode": "54321",
"addressCountry": "US"
}
}]
}
</script>