Skip to main content
Solved

Pulling data out of an array

  • November 26, 2020
  • 2 replies
  • 26 views

Forum|alt.badge.img+2

I’ve got a column that has data like this:
[{"Tags":"action"},{"Tags":"sci-fi"},{"Tags":"violence"},{"Tags":"youngadult"}]

I’d like to just extract the words, “action”, “sci-fi”, “violence”, “youngadult” so I can turn this into a multi-select column.

Any idea how I can use a formula or automation to do this? Thanks in advance!

Best answer by Justin_Barrett

This can be done by using a nested collection of SUBSTITUTE() functions to remove the pieces you don’t want. Here’s what I did:

SUBSTITUTE(
    SUBSTITUTE(
        SUBSTITUTE(
            SUBSTITUTE(
                SUBSTITUTE(Tags, '{"Tags":', ""),
            "]", ""),
        "[", ""),
    '"', ""),
"}", "")

2 replies

Justin_Barrett
Forum|alt.badge.img+21
  • Inspiring
  • Answer
  • November 26, 2020

This can be done by using a nested collection of SUBSTITUTE() functions to remove the pieces you don’t want. Here’s what I did:

SUBSTITUTE(
    SUBSTITUTE(
        SUBSTITUTE(
            SUBSTITUTE(
                SUBSTITUTE(Tags, '{"Tags":', ""),
            "]", ""),
        "[", ""),
    '"', ""),
"}", "")


Forum|alt.badge.img+2
  • Author
  • Inspiring
  • November 26, 2020

This can be done by using a nested collection of SUBSTITUTE() functions to remove the pieces you don’t want. Here’s what I did:

SUBSTITUTE(
    SUBSTITUTE(
        SUBSTITUTE(
            SUBSTITUTE(
                SUBSTITUTE(Tags, '{"Tags":', ""),
            "]", ""),
        "[", ""),
    '"', ""),
"}", "")


Thank you, that was perfect! You’ve unblocked my Thanksgiving project.