How to structure an array of entries in schema.org/JSON-LD?

by Johan Dahl   Last Updated August 13, 2019 11:04 AM

I'm implementing schemas for financial information (using JSON-LD), in this case mortgage loans.

The example on bottom the site https://schema.org/MortgageLoan shows how to implement this for a specific loan, however I'm not quite sure of how to modify the graph when I have several mortgage loans, each with a different loanTerm and interestRate. Should I just repeat this whole block for each loan? Or can I nest each mortgage loan under this @type somehow?

The information I want to convey is that a loan can have different loan terms, which will have different interest rates.

I could put the different rates and terms as nested objects under each label, but then there is seems to be no relation between the two.

How should I do this? This is some example code of what I have.

<script type="application/ld+json">
{
    "@context": "http://schema.org",
    "@type": "MortgageLoan",
    "name": "A name of this loan...",
    "loantype": "A type of loan...",
    "description": "A description...",
    "interestRate": [
        {
        "@type":"QuantitativeValue",
        "name":"Rate",
        "value": "3",
        "unitCode": "P1"
        }
    ],
    "loanTerm": {
        "@type": "QuantitativeValue",
        "name": "Binding period",
        "value": 12,
        "uniTtext": "months"
    }
}
</script>


Related Questions


Updated June 29, 2016 08:01 AM

Updated July 19, 2018 09:04 AM

Updated October 01, 2018 21:04 PM

Updated March 18, 2019 18:04 PM

Updated April 15, 2019 01:04 AM