I would like to see if somebody could post an example of how to dynamically create a JSON-LD to create a google rich card using JQuery? I would really appreciate if somebody could show me an example of how to implement this.
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [{
"@type": "ListItem",
"position": 1,
"item": {
"@id": "https://www.avenue.com/",
"name": "Home",
}
},{
"@type": "ListItem",
"position": 2,
"item": {
"@id": "https://www.avenue.com/en_US/plus-size-clothing/dresses/",
"name": "Plus Size Dresses",
}
}]
}
</script>