How can I deal with a column containing a list of items

35 views Asked by At

I want to make a dropdown of categories so I call https://data.seattle.gov/resource/n6as-h2bj.json?$select=categories&$group=categories Some of the rows have multiple categories. Is there anyway to handle this via SODA or do I have do it via javascript?

1

There are 1 answers

0
chrismetcalf On

Sorry for the delay in getting back to you, @tim-clemans. I missed this one.

I assume you're referring to the values separated by pipe (|) characters, correct?

{
    "categories": "Suspicious Circumstance|Alarm|Crisis"
},
{
    "categories": "Traffic|Suspicious Circumstance"
},

Unfortunately there's no functionality to do that from right within SoQL. A str.split(/|/) should probably do the trick though