Resolved: Adding MX Record(s) in AWS

 Recently, I was migrating MX records from WIX to AWS. I was using GSuite and I was unable to do the same. Then after a little bit of research, I found this stackoverflow link , which helped me resolve the problem. Here is how you should be adding the records in AWS. Record Name: @ Record Type: MX Value: <Priority> <Route Traffic to> example: 10 aspx.alt1.google.com And if you have multiple records, simply add the records in the same text area in the new line and no commas. This will resolve your problem. :)

How to find duplicates in an array in JavaScript?

Problem:

I was having a huge JSON file which contained almost 29K records and I was not sure whether or not it contains duplicates.

I want to find whether or not a JSON file contains duplicates.

Solution:

  1. I wrote a script in nodejs and used JavaScript Set which stores the unique values.
  2. Here is the script:

    const idSet = new Set();
        const hasDuplicateData = data.some((element) => {
         // for each element in test[] try to add the id to idSet
         return idSet.size === idSet.add(element.id).size;
       });
  3. Here is the github link.
Happy Coding!!!