Clay Icon

How to Combine Multiple Columns Into a Single Array in JavaScript

ยท
ยท

Hi team, is there a way to turn data from multiple columns into a single array? So I can use the index from the array to get the data from another array. Not even sure if we would be able to add that js formula to a single column.

  • Avatar of Sergio M.
    Sergio M.
    ยท
    ยท

    https://app.clay.com/workspaces/12308/tables/t_TARcGxC16vWt/views/gv_2OqTj6sAh49v I'd like to turn all the #of employees columns into a single array and the names of those companies into another array, and maybe a for cycle that returns the index from the company with the highest # of employees to be able to obtain the name using the 2nd array. Hope it is clear enough

  • Avatar of Clay Team
    Clay Team
    APP
    ยท
    ยท

    Hey, thanks for reaching out, sorry for the delay! Taking a look

  • Avatar of Clay Team
    Clay Team
    APP
    ยท
    ยท

    Sergio M., I added an integration to Extract a Field from the person's profile, which in this case is the company name. You can use this integration for such cases if all the info is within the person's profile.For the #employees, will add a separate option so you can check it out

    9d6697aa-e554-40b6-ae01-23f3b1096d60.png(47 kB)
  • Avatar of Clay Team
    Clay Team
    APP
    ยท
    ยท

    DM'd you a video about the second one :)

  • Avatar of Clay Team
    Clay Team
    APP
    ยท
    ยท

    Closing the thread for now!