Turn a table into a list of list

hi

to read data from Firebase there are different ways sometimes you succeed sometimes no.
i have could access to the great part of the data with the “look in pair block”
but t can’t access to the data below i tried : " list from csv row" , “list from csv table” and it do not works
perhaps someone has an idea

here is the data to turn in list of list : [1 4,1 52,4 81] => ((1 4) (1 52) (4 81))

Regards

Can you show the data as it appears in the firebase console? (if you are not using the default MIT)

otherwise, please show the raw data returned using the firebase component

How was the data added to Firebase?
Through AI2 blocks, or manually, or through some other program?

hi

here is the way data appears in the firebase console
i can get the tag nom, the tag zon easily but i can’t get data in liste
i try to clean with block replace text but i got nothing good
Capture d’écran (20)

regards

hi

here is the block which give me headache

blocks (15)

in another app i have could send and get back a list but it was a simple liste of name

in this app i want to send a list of list and i can’t retrieve it

regards

and the content of “global aenvoyer” ?
and how is that list created ?

the content on firebase for liste does not look good at all.

Why do you try to change the format of the liste on its way into Firebase?
What happens if you trust AI2 to store it as a table (list of lists) and retrieve it as such?
It’s dangerous to try to second guess AI2 in this regard.

hi

here is the content of “global aenvoyer”

it could be : ((1 2)) or ((2 3) (4 5)) etc …

when i use the “isalist block” it says it’s a list .

how i make this list with this kind of block

blocks (16)

Regards

hi

i try in different ways to do it because i don’t master for real
with this way

blocks (17)

i got this :slight_smile:
Capture d’écran (22)

and always difficult if not impossible to retrieve data from the tag" liste"

regards

You seem to be on the right track now, here are some blocks that may help you:

AI2 will save your list aenvoyer as the value for the key liste
When you call back the key liste you get the value as a list in AI2
You can then use list blocks to access individual elements of sub lists.

The important things is to send Firebase a list, then it will come back as a list.

(Note that the list you send is all in one value, it is not split out in key:value pairs in the way that Firebase usually does things)

hi

by continuing my research I found a solution by saving the data of the list in a 1D list
and using the “list to csv from list” block and it works I can access the data in the list much more easily

thanks

regards

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.