Question

Removing Duplicates from an array

  • 12 August 2023
  • 3 replies
  • 48 views

Userlevel 3
Badge +3

I have an array of values that looks like this: 

F11.20,Z51.81, 80307 99213 , F32.9,F90.0,F43.12, F11.20, F32.9,F41.1,F90.0

 

I want to remove the duplicate values; so I found this help article on the Community site:

 

The directions seem easy enough to follow; here is my action:

 

 

My result is this: 

 

 

Help !!!! Please

And thanks

 

gml


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 1
Badge +1

Hi @blueguy ,

Try to remove this line of code 

output = [{id: 123, hello: "word"}]

There should be only one `output` in your script, it will be output of your script. If there are more than two outputs, the last one will be returned.

Hope it helps!

Userlevel 3
Badge +3

Thanks that was the ticket!!

 

What else can be done (simply) with such code?  How else are others using this?

 

gml

Userlevel 1
Badge +1

Hi @blueguy ,

Code by Zapier was built to allow users do anything with either Python or Javascript code. It’s a great fit to apply complex logic/algorithms or build some actions that have not supported by any built-in Zap (yet!). You can find more information here.