Generation

generate functionThu, 09 Mar 2023

remove dublicated { "products": [ { "id": 1, "category": "smartphones", "thumbnail": "https://i.dummyjson.com/data/products/1/thumbnail.jpg" }, { "id": 2, "category": "smartphones", "thumbnail": "https://i.dummyjson.com/data/products/2/thumbnail.jpg" }, { "id": 3, "category": "smartphones", "thumbnail": "https://i.dummyjson.com/data/products/3/thumbnail.jpg" }, { "id": 4, "category": "smartphones", "thumbnail": "https://i.dummyjson.com/data/products/4/thumbnail.jpg" }, { "id": 5, "category": "smartphones", "thumbnail": "https://i.dummyjson.com/data/products/5/thumbnail.jpg" }, { "id": 6, "category": "laptops", "thumbnail": "https://i.dummyjson.com/data/products/6/thumbnail.png" }, { "id": 7, "category": "laptops", "thumbnail": "https://i.dummyjson.com/data/products/7/thumbnail.jpg" }, { "id": 8, "category": "laptops", "thumbnail": "https://i.dummyjson.com/data/products/8/thumbnail.jpg" }, { "id": 9, "category": "laptops", "thumbnail": "https://i.dummyjson.com/data/products/9/thumbnail.jpg" }, { "id": 10, "category": "laptops", "thumbnail": "https://i.dummyjson.com/data/products/10/thumbnail.jpeg" }, { "id": 11, "category": "fragrances", "thumbnail": "https://i.dummyjson.com/data/products/11/thumbnail.jpg" }, { "id": 12, "category": "fragrances", "thumbnail": "https://i.dummyjson.com/data/products/12/thumbnail.jpg" }, { "id": 13, "category": "fragrances", "thumbnail": "https://i.dummyjson.com/data/products/13/thumbnail.webp" }, { "id": 14, "category": "fragrances", "thumbnail": "https://i.dummyjson.com/data/products/14/thumbnail.jpg" }, { "id": 15, "category": "fragrances", "thumbnail": "https://i.dummyjson.com/data/products/15/thumbnail.jpg" }, { "id": 16, "category": "skincare", "thumbnail": "https://i.dummyjson.com/data/products/16/thumbnail.jpg" }, { "id": 17, "category": "skincare", "thumbnail": "https://i.dummyjson.com/data/products/17/thumbnail.jpg" }, { "id": 18, "category": "skincare", "thumbnail": "https://i.dummyjson.com/data/products/18/thumbnail.jpg" }, { "id": 19, "category": "skincare", "thumbnail": "https://i.dummyjson.com/data/products/19/thumbnail.jpg" }, { "id": 20, "category": "skincare", "thumbnail": "https://i.dummyjson.com/data/products/20/thumbnail.jpg" }, { "id": 21, "category": "groceries", "thumbnail": "https://i.dummyjson.com/data/products/21/thumbnail.png" }, { "id": 22, "category": "groceries", "thumbnail": "https://i.dummyjson.com/data/products/22/thumbnail.jpg" }, { "id": 23, "category": "groceries", "thumbnail": "https://i.dummyjson.com/data/products/23/thumbnail.jpg" }, { "id": 24, "category": "groceries", "thumbnail": "https://i.dummyjson.com/data/products/24/thumbnail.jpg" }, { "id": 25, "category": "groceries", "thumbnail": "https://i.dummyjson.com/data/products/25/thumbnail.jpg" }, { "id": 26, "category": "home-decoration", "thumbnail": "https://i.dummyjson.com/data/products/26/thumbnail.jpg" }, { "id": 27, "category": "home-decoration", "thumbnail": "https://i.dummyjson.com/data/products/27/thumbnail.webp" }, { "id": 28, "category": "home-decoration", "thumbnail": "https://i.dummyjson.com/data/products/28/thumbnail.jpg" }, { "id": 29, "category": "home-decoration", "thumbnail": "https://i.dummyjson.com/data/products/29/thumbnail.webp" }, { "id": 30, "category": "home-decoration", "thumbnail": "https://i.dummyjson.com/data/products/30/thumbnail.jpg" }, { "id": 31, "category": "furniture", "thumbnail": "https://i.dummyjson.com/data/products/31/thumbnail.jpg" }, { "id": 32, "category": "furniture", "thumbnail": "https://i.dummyjson.com/data/products/32/thumbnail.jpg" }, { "id": 33, "category": "furniture", "thumbnail": "https://i.dummyjson.com/data/products/33/thumbnail.jpg" }, { "id": 34, "category": "furniture", "thumbnail": "https://i.dummyjson.com/data/products/34/thumbnail.jpg" }, { "id": 35, "category": "furniture", "thumbnail": "https://i.dummyjson.com/data/products/35/thumbnail.jpg" }, { "id": 36, "category": "tops", "thumbnail": "https://i.dummyjson.com/data/products/36/thumbnail.jpg" }, { "id": 37, "category": "tops", "thumbnail": "https://i.dummyjson.com/data/products/37/thumbnail.jpg" }, { "id": 38, "category": "tops", "thumbnail": "https://i.dummyjson.com/data/products/38/thumbnail.jpg" }, { "id": 39, "category": "tops", "thumbnail": "https://i.dummyjson.com/data/products/39/thumbnail.jpg" }, { "id": 40, "category": "tops", "thumbnail": "https://i.dummyjson.com/data/products/40/thumbnail.jpg" }, { "id": 41, "category": "womens-dresses", "thumbnail": "https://i.dummyjson.com/data/products/41/thumbnail.webp" }, { "id": 42, "category": "womens-dresses", "thumbnail": "https://i.dummyjson.com/data/products/42/thumbnail.jpg" }, { "id": 43, "category": "womens-dresses", "thumbnail": "https://i.dummyjson.com/data/products/43/thumbnail.jpg" }, { "id": 44, "category": "womens-dresses", "thumbnail": "https://i.dummyjson.com/data/products/44/thumbnail.jpg" }, { "id": 45, "category": "womens-dresses", "thumbnail": "https://i.dummyjson.com/data/products/45/thumbnail.jpg" }, { "id": 46, "category": "womens-shoes", "thumbnail": "https://i.dummyjson.com/data/products/46/thumbnail.jpg" }, { "id": 47, "category": "womens-shoes", "thumbnail": "https://i.dummyjson.com/data/products/47/thumbnail.jpeg" }, { "id": 48, "category": "womens-shoes", "thumbnail": "https://i.dummyjson.com/data/products/48/thumbnail.jpg" }, { "id": 49, "category": "womens-shoes", "thumbnail": "https://i.dummyjson.com/data/products/49/thumbnail.jpg" }, { "id": 50, "category": "womens-shoes", "thumbnail": "https://i.dummyjson.com/data/products/50/thumbnail.jpg" }, { "id": 51, "category": "mens-shirts", "thumbnail": "https://i.dummyjson.com/data/products/51/thumbnail.jpg" }, { "id": 52, "category": "mens-shirts", "thumbnail": "https://i.dummyjson.com/data/products/52/thumbnail.jpg" }, { "id": 53, "category": "mens-shirts", "thumbnail": "https://i.dummyjson.com/data/products/53/thumbnail.jpg" }, { "id": 54, "category": "mens-shirts", "thumbnail": "https://i.dummyjson.com/data/products/54/thumbnail.jpg" }, { "id": 55, "category": "mens-shirts", "thumbnail": "https://i.dummyjson.com/data/products/55/thumbnail.jpg" }, { "id": 56, "category": "mens-shoes", "thumbnail": "https://i.dummyjson.com/data/products/56/thumbnail.jpg" }, { "id": 57, "category": "mens-shoes", "thumbnail": "https://i.dummyjson.com/data/products/57/thumbnail.jpg" }, { "id": 58, "category": "mens-shoes", "thumbnail": "https://i.dummyjson.com/data/products/58/thumbnail.jpg" }, { "id": 59, "category": "mens-shoes", "thumbnail": "https://i.dummyjson.com/data/products/59/thumbnail.jpg" }, { "id": 60, "category": "mens-shoes", "thumbnail": "https://i.dummyjson.com/data/products/60/thumbnail.jpg" }, { "id": 61, "category": "mens-watches", "thumbnail": "https://i.dummyjson.com/data/products/61/thumbnail.jpg" }, { "id": 62, "category": "mens-watches", "thumbnail": "https://i.dummyjson.com/data/products/62/thumbnail.jpg" }, { "id": 63, "category": "mens-watches", "thumbnail": "https://i.dummyjson.com/data/products/63/thumbnail.webp" }, { "id": 64, "category": "mens-watches", "thumbnail": "https://i.dummyjson.com/data/products/64/thumbnail.jpg" }, { "id": 65, "category": "mens-watches", "thumbnail": "https://i.dummyjson.com/data/products/65/thumbnail.webp" }, { "id": 66, "category": "womens-watches", "thumbnail": "https://i.dummyjson.com/data/products/66/thumbnail.jpg" }, { "id": 67, "category": "womens-watches", "thumbnail": "https://i.dummyjson.com/data/products/67/thumbnail.jpg" }, { "id": 68, "category": "womens-watches", "thumbnail": "https://i.dummyjson.com/data/products/68/thumbnail.webp" }, { "id": 69, "category": "womens-watches", "thumbnail": "https://i.dummyjson.com/data/products/69/thumbnail.jpg" }, { "id": 70, "category": "womens-watches", "thumbnail": "https://i.dummyjson.com/data/products/70/thumbnail.jpg" }, { "id": 71, "category": "womens-bags", "thumbnail": "https://i.dummyjson.com/data/products/71/thumbnail.jpg" }, { "id": 72, "category": "womens-bags", "thumbnail": "https://i.dummyjson.com/data/products/72/thumbnail.webp" }, { "id": 73, "category": "womens-bags", "thumbnail": "https://i.dummyjson.com/data/products/73/thumbnail.jpg" }, { "id": 74, "category": "womens-bags", "thumbnail": "https://i.dummyjson.com/data/products/74/thumbnail.jpg" }, { "id": 75, "category": "womens-bags", "thumbnail": "https://i.dummyjson.com/data/products/75/thumbnail.jpg" }, { "id": 76, "category": "womens-jewellery", "thumbnail": "https://i.dummyjson.com/data/products/76/thumbnail.jpg" }, { "id": 77, "category": "womens-jewellery", "thumbnail": "https://i.dummyjson.com/data/products/77/thumbnail.jpg" }, { "id": 78, "category": "womens-jewellery", "thumbnail": "https://i.dummyjson.com/data/products/78/thumbnail.jpg" }, { "id": 79, "category": "womens-jewellery", "thumbnail": "https://i.dummyjson.com/data/products/79/thumbnail.jpg" }, { "id": 80, "category": "womens-jewellery", "thumbnail": "https://i.dummyjson.com/data/products/80/thumbnail.jpg" }, { "id": 81, "category": "sunglasses", "thumbnail": "https://i.dummyjson.com/data/products/81/thumbnail.jpg" }, { "id": 82, "category": "sunglasses", "thumbnail": "https://i.dummyjson.com/data/products/82/thumbnail.jpg" }, { "id": 83, "category": "sunglasses", "thumbnail": "https://i.dummyjson.com/data/products/83/thumbnail.jpg" }, { "id": 84, "category": "sunglasses", "thumbnail": "https://i.dummyjson.com/data/products/84/thumbnail.jpg" }, { "id": 85, "category": "sunglasses", "thumbnail": "https://i.dummyjson.com/data/products/85/thumbnail.jpg" }, { "id": 86, "category": "automotive", "thumbnail": "https://i.dummyjson.com/data/products/86/thumbnail.jpg" }, { "id": 87, "category": "automotive", "thumbnail": "https://i.dummyjson.com/data/products/87/thumbnail.jpg" }, { "id": 88, "category": "automotive", "thumbnail": "https://i.dummyjson.com/data/products/88/thumbnail.jpg" }, { "id": 89, "category": "automotive", "thumbnail": "https://i.dummyjson.com/data/products/89/thumbnail.jpg" }, { "id": 90, "category": "automotive", "thumbnail": "https://i.dummyjson.com/data/products/90/thumbnail.jpg" }, { "id": 91, "category": "motorcycle", "thumbnail": "https://i.dummyjson.com/data/products/91/thumbnail.jpg" }, { "id": 92, "category": "motorcycle", "thumbnail": "https://i.dummyjson.com/data/products/92/thumbnail.jpg" }, { "id": 93, "category": "motorcycle", "thumbnail": "https://i.dummyjson.com/data/products/93/thumbnail.jpg" }, { "id": 94, "category": "motorcycle", "thumbnail": "https://i.dummyjson.com/data/products/94/thumbnail.webp" }, { "id": 95, "category": "motorcycle", "thumbnail": "https://i.dummyjson.com/data/products/95/thumbnail.jpg" }, { "id": 96, "category": "lighting", "thumbnail": "https://i.dummyjson.com/data/products/96/thumbnail.jpg" }, { "id": 97, "category": "lighting", "thumbnail": "https://i.dummyjson.com/data/products/97/thumbnail.jpg" }, { "id": 98, "category": "lighting", "thumbnail": "https://i.dummyjson.com/data/products/98/thumbnail.jpg" }, { "id": 99, "category": "lighting", "thumbnail": "https://i.dummyjson.com/data/products/99/thumbnail.jpg" }, { "id": 100, "category": "lighting", "thumbnail": "https://i.dummyjson.com/data/products/100/thumbnail.jpg" } ], "total": 100, "skip": 0, "limit": 100 }

const _ = require('lodash'); var arr = [ { "id": 1, "category": "smartphones", "thumbnail": "https://i.dummyjson.com/data/products/1/thumbnail.jpg" }, { "id": 2, "category": "smartphones", "thumbnail": "https://i.dummyjson.com/data/products/2/thumbnail.jpg" }, { "id": 3, "category": "smartphones", "thumbnail": "https://i.dummyjson.com/data/products/3/thumbnail.jpg" }, { "id": 4, "category": "smartphones", "thumbnail": "https://i.dummyjson.com/data/products/4/thumbnail.jpg" }, { "id": 5, "category": "smartphones", "thumbnail": "https://i.dummyjson.com

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant