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, 2022 in Others by Kichu
• 19,050 points
342 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, 2022 by narikkadan
• 63,700 points

Related Questions In Others

0 votes
1 answer

How to concatenate elements of a single-dimensional array using VBA?

Using Microsoft 365's UNIQUE and SORT in VBA ' This is a ...READ MORE

answered Feb 16, 2023 in Others by narikkadan
• 63,700 points
421 views
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
756 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,190 points
921 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, 2022 in Others by narikkadan
• 63,700 points
1,812 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, 2022 in Others by narikkadan
• 63,700 points
817 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, 2022 in Others by narikkadan
• 63,700 points
2,895 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, 2022 in Others by narikkadan
• 63,700 points
5,428 views
0 votes
1 answer

array of LocalBusinessJsonLd Schema using next-seo

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

answered Feb 14, 2022 in Others by narikkadan
• 63,700 points
812 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