Platform
Resources
Pricing
Sign in
Get started
Loïc Jaouen
Workspace
Fork
Public
By
Loïc Jaouen
Edited
Mar 30, 2023
Insert cell
Insert cell
Insert cell
Insert cell
md
`Note: I *stole* this request from the browser's developper tool when accessing beol.
It returns the first 25 matching letters, that you can browse below:`
Insert cell
result_json_as_text
=
fetch
(
knora_search_url
,
{
method
:
'POST'
,
body
:
correspondance_request
}
)
.
then
(
response
=>
response
.
text
(
)
)
;
Insert cell
md
`maybe easier to scroll through as json:`
Insert cell
result_as_json
=
JSON
.
parse
(
result_json_as_text
)
;
Insert cell
Insert cell
result_text_as_xml
=
fetch
(
knora_search_url
,
{
method
:
'POST'
,
headers
:
{
'Accept'
:
'application/rdf+xml'
}
,
body
:
correspondance_request
}
)
.
then
(
response
=>
response
.
text
(
)
)
;
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.
Insert cell
result_html
=
result_text_as_xml
.
replace
(
/beol:letter/g
,
'beol_letter'
)
;
Insert cell
html
`<style>
beol_letter {
display: block;
font-weight: bold;
margin: -.75em 0px .25em -.25em;
padding: .1em .25em;
}
`
Insert cell
html
`${
result_html
}`
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
knora_search_url
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
correspondance_request
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
result_json_as_text
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
result_as_json
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
result_text_as_xml
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
result_html
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML