Skip to main content
Question

Removing Duplicates from an array

  • August 12, 2023
  • 3 replies
  • 113 views

Forum|alt.badge.img+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

agileops
Forum|alt.badge.img+1
  • Zapier Solution Partner
  • August 13, 2023

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!


Forum|alt.badge.img+3
  • Author
  • Beginner
  • August 13, 2023

Thanks that was the ticket!!

 

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

 

gml


agileops
Forum|alt.badge.img+1
  • Zapier Solution Partner
  • August 14, 2023

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.