How do i compare data between two arrays saved in separate variables and extract the unique data
So basically I'm running two different api calls one to google calendar and another to Microsoft events and saving each of the these events results in their own variables, so i want to compare the results saved in those variables between each other and save the unique ones in a variable. This is my current set up
the data I'm trying to compare is in the google events and Microsoft events variable, then I'm trying to find all the elements where the title matches. but i keep getting this error
even thought the google variable contains this data
any idea on how to approach this?
Best Answer
-
@iconic are you totally sure that all
google_events
items have thesummary
key? Can you check in the debugger which specificgoogle_events
item threw the error?My suggestion is to avoid using the dot notation whenever you are not completely sure about the presence of an object key. Better apply the filter
get
to$this
that allows you to set any default value you like in case thesummary
key is missing, instead of throwing an error.
Answers
-
Thanks!!!!!!!!! solved the issue
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