Skip to main content

All Questions

0 votes
3 answers
90 views

Remove some array object comparing with another array JavaScript

I have two dynamic array. One is Array of objects and another one is array of some string. First Array is : const initialColumns = [ {content: "Registered Name", id: "name"}, { ...
Asadul Rahman's user avatar
-1 votes
1 answer
207 views

How to replace the object array using simple filter and spread operators

I need a suggestion for the below code. The objective here is to remove the specific array if the mentioned menuKey is present. Note: sdb.menu = 'account-links' (Declared in another file); const { ...
Saravanan R's user avatar
0 votes
2 answers
27 views

Removing objects from [key, value] object

I'm a beginner and I'm learning, please don't close my question. I need to filter elements with the property toRemove:true { 1: {itemId: 10, offset: 5, verticalPosition: 1, horizontalPosition: 35, ...
felipe muner's user avatar
0 votes
3 answers
31 views

How to concataecance object array values of duplicates

I have an object that contains duplicate id properties and I want to reduce them to one array for each. I only figured out a way to find unique ids, but how can I concat the name attribute? const x = [...
Dorbn's user avatar
  • 337
0 votes
1 answer
587 views

Filter object base on parameters - Check if Object values are equal to parameters ES6

I'm having a problem with object filter. What I want to do is to filter array of objects when given parameters are equal to Object values. And return the objects only if all values in the object are ...
kasia's user avatar
  • 298
-3 votes
1 answer
183 views

Properties of object into a comma separated string [closed]

I have a solution where I iterate over each object key and its values however it seems a bit "hacky" to me. Does anybody have a better solution using ES6, Object.values, or other approaches? ...
jcunhafonte's user avatar
1 vote
2 answers
43 views

Array of objects filter and get values in another structure

I have data as Array of objects, i should filter the data and get objects and minimal keys with values, i have tried with loops and filter but i couldn't get as expected. I have shared the data which ...
Sam's user avatar
  • 111
0 votes
1 answer
49 views

Range Filter by within array of object

I want to make shift parser helper which is generate time of work shift, below is shift rule let shift_rule = [ { shift: '07-12', start: 7, finish: 12 }, { shift: ...
Ario Setiawan's user avatar
-1 votes
1 answer
341 views

Filter Hours based on different timings

I want a generic javascript function which should accept an array of objects. Each object has an hours property which is an array ,can be seen in below code. Every hours shows different timings for ...
Ankita Sharma's user avatar
0 votes
1 answer
54 views

Filtering in Object of Arrays in Javascript

I am trying to filter out an Object of Arrays wherein I have to filter out the 'designation' 'options' of a key. My row Object looks like. {id: 1, columns: Array(5)} columns: (5) [InputDate, ...
Sam_2207's user avatar
  • 2,979
5 votes
3 answers
130 views

How to sum values in array by specific object key?

I have an array of js objects which look like this: var objArr = [ {"Country": "US", "City": "MyCity1", "2017-07-12": "1", "2017-07-13": "2"}, {"Country": "US", "City": "MyCity2", "2017-07-...
Jan's user avatar
  • 15.4k
0 votes
3 answers
49 views

Return object has condition true from object has key

I have question about object. I want to filter to return list of keys has condition true in this object below: myObject = { key1: { name:"key1", select:true }, key2: { name:"...
Hai Tien's user avatar
  • 3,077
1 vote
2 answers
700 views

Destructuring an Object fields and Calculating the Sum in Javascript

I am having trouble figuring out how to destructure and add the total sum of an object with fields. Previously we bad separate objects in an object array. Now they are summed in 1 object and it looks ...
lost9123193's user avatar
  • 10.9k
1 vote
2 answers
60 views

Filtering and combining indexes in an array of objects with one property that is the same

Trying to figure out what the best practice for taking one array of objects in JS and combining the properties of it's indexes based upon a shared property value. Basically, I have an array of users ...
Ireedemable Fool's user avatar
0 votes
2 answers
1k views

TypeError: obj[key].includes is not a function: in filter function

I would like find objects that have any propery with some value. But I have error: TypeError: obj[key].includes is not a function. How to fix it? var aa = [{id: 1,type: 1,status: 1,name: 'txt'},{...
befreeforlife's user avatar

15 30 50 per page