Guileasblog.etheve.eu·Jun 12, 2024MongoDB - Prevent duplication in your arraysWhen we want to insert data in an array in Mongo we use $push . But it won't prevent you from inserting multiple times the same value in your array. If you want to ensure that there's no duplication. You can use : $addToSet How it works When you want...DiscussWhat I've learned todayMongoDB
Behnam Amiribehnam-amiri.hashnode.dev·May 20, 2024From Shallow to Deep: A Comprehensive Guide to JavaScript Data Duplication for Arrays and ObjectsIntroduction Let's quickly review data types in JavaScript. In JavaScript, data types are broadly categorized into two categories: primitive and non-primitive.Primitive data types are the predefined data types provided by the JavaScript language. The...Discuss·1 like·49 readsData Duplication