array of LocalBusinessJsonLd Schema using next-seo

0 votes

 I am trying to add multiple localbusiness schema in my next js application, I am using next-seo package for this

import { LocalBusinessJsonLd } from 'next-seo'

{locations.map((location) => (
    <LocalBusinessJsonLd 
      type="Store"
      name={location.node.name}
      description={location.node.description}
      telephone={location.node.phone}
      address={{
        streetAddress: `${location.node.street}`,
        addressLocality: `${location.node.city}`,
        postalCode: `${location.node.postalCode}`,
        addressCountry: `${location.node.countryIso}`,
      }}
    />
))}

But when I did inspect its showing only last location in the schema not array of schema

Feb 23 in Others by Kichu
• 19,040 points
112 views

1 answer to this question.

0 votes

" If your page requires multiple instances of a given JSON-LD component, you can specify unique keyOverride properties, and next-seo will handle the rest.
This comes in handy for blog rolls, search results, and overview pages.
Please fully research when you should and shouldn't add multiple instances of JSON-LD. "

this is a statement taken from an article this answers your question and  take a look at this code for reference 

<ExampleJsonLd keyOverride="my-new-key" />
answered Feb 24 by narikkadan
• 37,660 points

Related Questions In Others

0 votes
1 answer

Reducing sequences in an array of strings

I've written a C# app to solves ...READ MORE

answered Nov 2, 2018 in Others by DataKing99
• 8,240 points
317 views
0 votes
1 answer
0 votes
1 answer

Can you please let m know what are the timings of next batch of AWS

Hey Anil,  As you can see from the ...READ MORE

answered Mar 26, 2020 in Others by Vardhan
• 13,200 points
447 views
0 votes
1 answer

Next seo test with react testing library

 you need to mock next/head, pass document.head to the container ...READ MORE

answered Feb 11 in Others by narikkadan
• 37,660 points
666 views
0 votes
1 answer

How to make Component Variant in Google Optimize A/B testing in Next js

Render all the components in ReactJs after ...READ MORE

answered Feb 18 in Others by narikkadan
• 37,660 points
478 views
0 votes
1 answer

Avoid Duplicate Meta Description and Keywords in Next.js

First of all take a deep look ...READ MORE

answered Feb 22 in Others by narikkadan
• 37,660 points
1,248 views
0 votes
1 answer

How to use next-seo for setting nextjs meta tag with multiple OGP images?

https://github.com/garmeeh/next-seo use this git repo that contains ...READ MORE

answered Feb 24 in Others by narikkadan
• 37,660 points
1,080 views
0 votes
1 answer

array of LocalBusinessJsonLd Schema using next-seo

specify the unique keyoverride properties if you ...READ MORE

answered Feb 14 in Others by narikkadan
• 37,660 points
335 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP