[Solved] How to eliminate duplicates?
Options
![Gino](https://us.v-cdn.net/6037124/user_avatars/3556485.jpg)
Gino
Member ✭
I will try to make it as simple as possible 🙂
There is a table where I have some emails.
email1@test.com
email2@test.com
email3@test.com
email4@test.com
email5@test.com
When I submit a JSON:
{
"contacts": [
{
"email": "email1@test.com"
},
{
"email": "email2@test.com"
},
{
"email": "email3@test.com"
}
]
}
I want to get back something like:
{
"contacts": [
{
"email": "email4@test.com"
},
{
"email": "email5@test.com"
}
]
}
I feel like it's not a complicated thing but I can't make it work 😠 🙂
I would appreciate a lot a loom or some kind of help!
Thx in advance!
There is a table where I have some emails.
email1@test.com
email2@test.com
email3@test.com
email4@test.com
email5@test.com
When I submit a JSON:
{
"contacts": [
{
"email": "email1@test.com"
},
{
"email": "email2@test.com"
},
{
"email": "email3@test.com"
}
]
}
I want to get back something like:
{
"contacts": [
{
"email": "email4@test.com"
},
{
"email": "email5@test.com"
}
]
}
I feel like it's not a complicated thing but I can't make it work 😠 🙂
I would appreciate a lot a loom or some kind of help!
Thx in advance!
Comments
-
So you want an api endpoint that when you send a list of emails, it checks which are in the database and returns those that are not in the database?
To do this, I would
0. Create a new variable called output of type array
1. loop over the input array, and for each item
2. extract the email value
3. Run a get record on the database to see if there is matching value
4. If there is not, add item to the end of output
5. After the loop, return output
you have your filter!
If you want to work on this together I would expect it probably takes 20 minutes. I provide 1-1 mentoring services on statechange.ai -
Thx Ray! It's working. I just need to change stuff according to how I need the data out but I think I will manage to do that.
I would alos love to jump into some quick calls with someone but $100 for 20 minutes it's too much for me at the moment.
Thx again for your help! -
I run free meetups (next one this afternoon) which are a mix of discussing no-code topics, showing off projects, and helping with hard problems. If you are ok with the timing and discussing in public, you can get help without charge! The next one is this afternoon - learn more about them here.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback