[TinyDB] It is possible to have a tag inside other tag?

(SVasco) #1

Hi:

Using TinyDB…

It is possible to add a tag inside other tag?
Something like this:

root
— | — User (in root)
----------- | — Name (in User)
----------- | — EMail (in User)
— | — OtherTag (in root)

(Cian) #2

Well yes and no.

You can create your own list and sublist but you need to create your own delineator. Kinda like what a JSON does.

TAG = root
VALUE = user,name;Jim,email;[email protected]

1 Like
(SVasco) #3

It will only work like this?
tag_name=value1:1;value2:2;value3:3
or
tag_name1=value1
tag_name2=value2

So, there is no way to make tags like a tree!?

(Cian) #4

Thats not what I said. You asked if you could mix and nest objects. My examples shows how you can.

(SVasco) #5

@cian, my idea is to have something like this:
[TinyDB]

  • Users
    ----- | Name
    ----- | Email
    OtherTag
    ---- Tag1
    ---- Tag2
(Cian) #6

Yes and I showed you that. You are just writting it out different.

TinyDB uses ONE tag, so you need to create sublists in that tag. You do that by changing the delineator (as I said)

Notice I use ; and , different to separate and create sublists.

2 Likes