Split a Global Variable

First I opened a csv file and captured it into a global variable.
Now I need to loop through the global variable and get the individual fields

the variable looks like this:

["Name,Address,Number","Fred,RSA,555","James,USA,666"]

I need to search for RSA and only show the RSA fields, and only the name and number fields.

So first I need to split the variable into the different "records" and then search the "fields" for whats needed.

where is the data coming from?
you might want to work with a database, which offers filter options...

for example if you use a SQL database, you could filter easily like this
SELECT Name, Number FROM myTable WHERE Address = "RSA"

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

Something like this:

See https://docs.google.com/document/d/12t4HLNRepCnbmcfycdF8wSHWht_D1P8hKJpTknVDChY/edit?usp=sharing

This list is from a variable which has the [ ] brackets as well, will this remove them and or ignore them?

My blocks make an AI2 list like this:

[["Name", "Address", "Number"], ["Fred", "RSA", "555"], ["James", "USA", "666"]]

and return Fred and 555 in the labels, no double quotes or brackets.

If I assume your "list" is coming from the csv file without brackets:

"Name,Address,Number","Fred,RSA,555","James,USA,666"

and you then make a list with the list from csv row block, you could use these blocks:

See this very similar thread ...