Linked Questions

4 votes
5 answers
518 views

I am dealing with the following problem from my data structure book. I have come up with the solution as suggested by this text . I basically found all the duplicates and labelled them some arbitrary ...
user1010101's user avatar
  • 1,658
2 votes
0 answers
45 views

I am supposed to write a function that passes two arrays, a and b, and removes elements from 'a' that are found in 'b'. This is my code function array_diff(a, b) { for( var i = 0; i < b.length; ...
5 votes
2 answers
28k views

How may I retrieve an element that exists in two different arrays of the same document. For example. In Posts collection, document has the fields 'interestbycreator' and 'interestbyreader.' Each ...
3 votes
4 answers
4k views

I'm trying to subtract, i.e. remove, multiple objects, namely the objects of array2 found in array1 so that the end result is that array2 only contains the "jean" object. Help! I'm lost. I tried ...
jean's user avatar
  • 73
0 votes
4 answers
1k views

I have 2 arrays of objects. Array1: [{ id: 2, ref: 1010101 }, { id: 2, ref: 1010107 }] Array2: [{ id: 2, ref: 10010001 }, { id: 2, ref: 10010002 }, { id: 2, ref: 10010003 }, { id: 2, ref: ...
-3 votes
5 answers
2k views

I am having two objects i would like to compare those objects and remove the duplicate objects by value and show the rest of the objects.I have tried lodash omit but it doesn't works. let users = ...
-6 votes
1 answer
2k views

My first Json Array is like : [ {"Invent":"4","Beze":"256","mail":"[email protected]"}, {"Invent":"4","Beze":"261","mail":"[email protected]"}, {"Invent":"4","Beze":"260","mail":"[email protected]"}, {"...
0 votes
5 answers
902 views

I have little problem with Js arrays. I have two arrays - one is correct all the time (created with correct data) and one is coming from fetching basically. I'm trying to compare these two arrays and ...
Kertix's user avatar
  • 73
1 vote
2 answers
459 views

I am kinda new to Javascript and I cant figure out how to do this. So , I have this ( from csv file ) array1 [{...}, {...}, {...}, {...}, {...}, {...}, {...}] 0: {Number: 1} 1: {Number: 2} 2: {Number: 3} 3: {...
Jaxie's user avatar
  • 35
1 vote
2 answers
446 views

I have 2 arrays of time string. i want to remove elements of arr1 that is already presented in arr2. These are my arry : arr1 = ["05:30", "05:45", "06:00", "06:15", "06:30", "06:45", "07:00", "07:...
0 votes
2 answers
238 views

Problem Statement: Our aim is to allocate values in the array ytQueryAppJs, which are returned from a time consuming function httpsYtGetFunc(). The values in ytQueryAppJs needs to be used many times ...
-2 votes
2 answers
222 views

var arr1=["a","b","b","c","c","d"]; var arr2=["b","c",]; arr1 has duplicate values which are listed in arr2. Now I want to remove the duplicate values from arr1 using arr2. Is it possible?
0 votes
3 answers
294 views

I have an array with objects like this: const array = [ {name:'obj1', address: 987, id: '123', location: 'zyx' }, {name:'obj2', address: 654, id: '456', location: 'wvu'}, {name:'obj3', ...
0 votes
1 answer
176 views

I am working on the roleUpdate event on my Discord bot, I have old role permissions, and new role permissions in the form of an array which prints: [ 'VIEW_AUDIT_LOG', 'MANAGE_ROLES' ] // Old Roles [ ...
0 votes
1 answer
189 views

Flow: The user submits a queryValue in index.html. Three API calls are made (using a function called ytAxiosGetFunc) based on the queryValue. The returned values are put in three arrays: ytQueryAppJs,...

15 30 50 per page
1
2