All Questions
622 questions
0
votes
1
answer
57
views
How do get search filter data in es6
// Filter rows based on string values and exclude from whiteList
const whiteList = rows.map(sel => sel.RuleAutoID); // Array of IDs to exclude
console.log('whiteList', whiteList);
// Assuming you'...
0
votes
2
answers
98
views
How to filter an array that has mixed data types
I have an array which is like this:
const AllFiles = [
{name: "ExistingFile1", mimetype: "image/jpg", size: "500"},
[
File, // This is the New File itself ...
-1
votes
2
answers
106
views
Sorting/Manipulating an array of objects
I need help in writing a function to sort an array of objects
all objects with xid are bottom in array
object (assume A) which has options array might contain xid in step object, This xid is also ...
1
vote
1
answer
42
views
sum the value inside array of objects based on multiple conditions
I have this object
[
{
"year": 2020,
"term": 1,
"worthAmountEGP": 0
},
{
"year": 2020,
...
0
votes
1
answer
21
views
Make object key as value and assign new key to value in array of objects
I have an array of objects with multiple properties. I want to be able to make the property's key a value and assign a new key to my value.
My code:
var list = [
{
you: 100,
me: 75,
...
0
votes
0
answers
16
views
Object not getting populated by Axios Function [duplicate]
I have an axios function using GraphQL. It is a nested axios that is supposed to populate an object but is not. What is missing in my code?
My code:
const higher_fnc = (query_name) => {
return ...
-1
votes
4
answers
64
views
Add values from Array to every Object in Array
For a project i need to push the values of an array into every object in another array.
What i have so far:
closed_status = [{
"project_no": 5,
"priority": 3,
"s_status": "S8",
"...
0
votes
0
answers
260
views
Error when passing array of objects as variable in graphQL
I am trying to pass an array of objects as a variable in a graphQL mutation. The variables are populated from a forEach loop and pass the mutation to an axios function.
My code:
const query = "...
0
votes
2
answers
68
views
Transform the array of object or nestobject into desire format
I am trying to transform the array object into new object with some new key name and rest of the key convert into cameCase
Example:
1. Old Key to New Key name
old key: orgId converting into ...
-2
votes
2
answers
79
views
Find matching object property in array and merge into new object [closed]
I have an array of objects, where I want to find the objects having same value for name property and then merge them into single object by adding their values & subvalues.
const arr = [
{ id: 1, ...
0
votes
0
answers
209
views
Create array of objects from graphql response
I have a response from graphql that I want to reformat and assign to a variable so that I can keep using them across my app.
GraphQL response:
{
"data": {
"organization"...
-2
votes
1
answer
294
views
JavaScript get comma separated values based condition
Hi I'm having an issue filtering out the values from array of objects. So basically I've an array of object
const arr = [
{
"id": null,
"name": null,
&...
0
votes
1
answer
86
views
Javascript - convert array multi level to single level [duplicate]
I am trying to map a complex object array document to a single level array. For example
const data = [
{
"id": 1,
"name": "Beauty",
"...
3
votes
2
answers
4k
views
Add a new key and value to a Javascript object from an existing array of values
I have an existing array of ids that I'm trying to iterate over to add each as an id: key to an existing array of objects. I have tried a number of different loops (for, for in, map, forEach), but I ...
1
vote
2
answers
52
views
Converting object to array with objects
I need help sorting this out, I tried object.keys with map, but can't get too far, so, I have this object and each key has an array:
const first = {
"apples": [
"5.78",
...