mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
.json?_labels=1 to expand foreign keys, refs #233
Output looks something like this:
{
"rowid": 233,
"TreeID": 121240,
"qLegalStatus": {
"value" 2,
"label": "Private"
}
"qSpecies": {
"value": 16,
"label": "Sycamore"
}
"qAddress": "91 Commonwealth Ave",
...
}
This commit is contained in:
parent
5bda4a477c
commit
825b8a2557
4 changed files with 107 additions and 3 deletions
|
|
@ -193,3 +193,7 @@ The Datasette table view takes a number of special querystring arguments:
|
|||
``?_next=TOKEN``
|
||||
Pagination by continuation token - pass the token that was returned in the
|
||||
``"next"`` property by the previous page.
|
||||
|
||||
``?_labels=1``
|
||||
Indicates that you would like to expand any foreign key references. These
|
||||
will be exposed in the JSON as ``{"value": 3, "label": "Monterey"}``.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue