Getting started
What is an object property? An object in this context resembles an actual thing; be it a product, a car, an employee, or a receipt. It's something that a model holds, it's also what an object property is, you can save a thing (or object) within a model using the object property. This is very helpful when you need to save something that has multiple values, like the answer to a question that has a score attached to it. Read more about the basics of properties here, and if you want to know more about creating object properties take look at this article.
Working with the object property
In order to create an object property, you first need to create a schema model. In this example, I'll add the location of the warehouse where a product is stored. The schema model is called 'WarehouseLocation'.
{
"$id": "https://example.com/geographical-location.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "A geographical coordinate on a planet (most commonly Earth).",
"properties": {
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
},
"uuid": {
"indexed": true,
"type": "string"
}
},
"title": "Longitude and Latitude",
"type": "object"
}
After creating a schema model you can then add the values inside the model. Let's add a model called 'Product' and add our warehouse location schema model as the object property.
Now we can add the location of the warehouses. In this case, I've added 1 warehouse location with the coordinates -34,76 and another one placed at 23,-84.
This feature is currently still being developed. In the near future, this article will be expanded upon with a page builder use case.