How does the "tags" field work for Text Annotation widget?

For example, let’s say text is:
“I live in San Francisco”
And labels are:
{{ [“name”, “city”] }}
How do I use the tags? Maybe something like this to tag “San Francisco” as “city”
{{“city”, “San Francisco”}}
Context: I’m tagging text data for my app. The text annotation widget looks great- would save me some time. Tried looking for docs and examples, didn’t see any.

Hi Sebastian,
You can highlight a word in your text and that’ll bring up an option to map text to a tag.
Extracting the tags is a bit harder since each tag is stored in a list.
I wrote a bit of JS that would be an example to get the tag text from the first tag.
textannotation1.text.slice(textannotation1.tags[0].start, textannotation1.tags[0].end)

If you inspect it using the lefthand sidebar, you can see what data the textannotation component stores.

That’s exactly what I was looking for, thank you. The tags structure of {{[{start: 10, end: 23, label:"city", id:0}, {start: 127, end: 128, label:"currency", id:1}]}} is working for me.