I have a script that generates a list within a list, similarly formatted to the example below. I’d like to use that list to make a new list with only colors, or only numbers.
I would expect the code below to return {"5, "20", "15"}
, but it returns {"blue", "5"}
.
set theList to {{"blue", "5"}, {"orange", "20"}, {"yellow", "15"}}
set colorList to item 1 of (every item of theList)
return colorList
How do I use this to make a new list by obtaining the first (or second, or third) part of every list within the bigger list? Such that I could get either
{"blue}, {"orange"}, {"yellow"}
or
{"5}, {"20"}, {"15"}