I have the following JSON response that I wish to map into my entity:
{
"name": "Andrew",
"stop_ids": [
"956",
"957",
"958"
]
}
I know that I can create a one to many relationship if I create another entity with my stop_ids
, but is there a way to map this directly?
Here's my code below, and I don't know how to directly map the array below as my property.
Entity person = schema.addEntity("person");
person.addStringProperty("name");
person.addArrayProperty("stop_ids"); //what is the correct way to do this?