All Questions
3,216
questions
-3
votes
1
answer
43
views
Filter/Remove array object based on value, from nested JSON array object in JavaScript
I have a filter criteria to apply on REST response. This response have nested sub objects. For loop going in task and filter function is not working on nested array objects. Please help me to filter ...
0
votes
1
answer
37
views
YQ - how to filter an array by field value if matching at least one element in a list
Specifically (https://github.com/mikefarah/yq) 4.35+
I have a comma-separated string of terms and I want to filter down a list if a field value is one of those terms.
Ex) Given the following input:
- ...
0
votes
1
answer
52
views
How to filter array by value between two arrays with more object with javascript? [duplicate]
I have 2 array:
var array1 =
[{"name":"abc", "url":"http:://example1.com"},
{"name":"cde", "url":"http:://example2.com"}...
0
votes
1
answer
45
views
Filter a new array which index is divided by two [duplicate]
I have a array of number. I want to filter a new array which have element which index is divided by two
Example:
let arr = [1, 4, 5, 2, 8, 9, 7, 10];
I want filter a 2 new arrays like:
let odd = [1, ...
1
vote
2
answers
37
views
How do I auto fill an empty value of an object in an array with an object that matches from another array in JS?
I've been trying to create a table that auto fill empty fields depending of the previous information provided but I don't know how to make it possible, do you have any idea?
Here's an example of an ...
1
vote
2
answers
81
views
Filter to remove starting zeros from numeric array in php
I want to create a callback function to remove from a numeric array the given values.
Given this array: [ 0, 0, 0, 0, 1, 0, 3, 4, 5, 2, 0, ];
I want to create a callable function to be passed to ...
1
vote
3
answers
116
views
Combining Excel FILTER() and SUM() Functions
As efficiently as possible, I am wanting to take a tabular dataset in Excel where there are (purposefully) duplicate identifiers to records and consolidate this to a unique/summed dataset (very common ...
0
votes
3
answers
55
views
Filter an array of objects based on multiple categories
The data looks like:
export const data = [
{
id: 1,
company: "Photosnap",
logo: "./images/photosnap.svg",
new: true,
featured: true,
position: "...
-1
votes
3
answers
62
views
filter array in Google Script, but returns only one row
I created an array and i want to filter it
The array has
responseTimeStamp in Col0,
TargetDate in Col1,
Data in Col2-Col5,
and for testing same responseTimeStamp in Col6 (DisplayValue),
and for ...
-2
votes
2
answers
60
views
Remove item in array not include substring
I have a string like this
let myarr = ['A511-0001-01', 'APWA-0001-03', 'APWA-9999-99'];
and i have a substring to filter myarr like AP.
let filteringCondition = 'AP';
how can i get myarr to (remove '...
-3
votes
1
answer
53
views
Search array of objects with children [closed]
There is an array of objects with nested objects. When searching, you need to display all requested results and their parents
const data = [{
"title": "News",
"children&...
0
votes
0
answers
23
views
Google Sheets - How do I filter a range using a list with dynamic criteria on each line?
I am trying to build a dynamic filter that will filter a data range based on an list of employee #'s AND the pay period they started and stopped working on a project (I feel like this should be easy, ...
1
vote
6
answers
91
views
Two dimensional array, filter and return new array with the indexes rather than values
I have a two dimensional array that in turn has an object with an additional array.
I want to filter the array and return a new array with the index that matches the criteria with the object.
For ...
2
votes
6
answers
95
views
How to filter out a key from a second level object of a nested array of objects
I am trying to filter out a key, in this case, count from a nested array of objects.
I have
let test = [
{
"id": "c3c6f410f58e5836431b473ebcf134756232d04f2bf35edff8",
"...
0
votes
1
answer
27
views
how can I add filter to search bar of website by j.s
i have question in search bar .
in a page I have at least 30 product .
i will add filter that when client search the name of product ,product show .
i tried to craete filter but I couldnt write ...