xxxxxxxxxx
_expand query string //query string parameter feature of json-server
"products": [
{
"id": 1,
"locationId": [1, 2, 3, 4, 5],
"productTypeId": 1,
"name": "Extra",
"price": 700
}]
---------------------------------------------------------
"productTypes": [
{
"id": 1,
"type": "Gum"
}]
---------------------------------------------------------
http://
localhost:8088/products/?_expand=productTypeId&_expand=productType
{
"id": 1,
"locationId": [1,2,3,4,5],
"productTypeId": 1,
"name": "Extra",
"price": 700,
"productType": {"id": 1,"type": "Gum"}
}