All Questions
28
questions
0
votes
5
answers
126
views
How to print a name by a given ID
var people = [
{name: 'John', id: [34, 44, 77]},
{name: 'Jose', id: [43, 54, 65]},
{name: 'Hanna', id: [56, 34, 98]}
];
var peopleFinder = people.filter(function(b){
return b.id === ...
-2
votes
2
answers
99
views
How to parse an objects with array index to object array with key value pairs
Convert this object Students object to one Students array
{"SubmitBy":"SK", "Students[0].name":"Jhon", "Students[0].age":"15", "...
2
votes
3
answers
204
views
Group an array of objects based on multi keys in Javascript?
I would like to share with you an existence problem
I have array as follows
const data = [
{
"countries": ["France", "USA", "Canada"],
"city": &...
0
votes
2
answers
28
views
How to join the objects that have the name in common and do the sum of the values of the key value1 and value2. Javascript
I have an array with the following objects:
const arrayData = [
{name: 'John', car:'BMW', value1: 500, value2: 350},
{name: 'Paul', car: 'AUDI', value1: 290, value2: 200},
{name: 'John', car:'BMW', ...
1
vote
2
answers
63
views
Javscript/TypeScript: Find the key and append value as an array
I have an object which is like
[{
Date: 01/11/2022,
Questionnaire: [
{Title: 'Rating', Ans: '5' },
{Title: 'Comment', Ans: 'Awesome' }
]
},
{
Date: 01/11/2022,
Questionnaire: [
...
1
vote
1
answer
45
views
Create new Object from a complex array of objects using Javascript
I have an array of objects and I want to push only the values of each object inside the array to a new object as a key value pair using Javascript.
eg:
const prices = [
{ ticker: 'msft', price: 14.3 ...
-1
votes
3
answers
970
views
javascript create array item in 10 interval upto 100
I want to create array of object in javascript like interval manner which is dynamic like suppose interval value is 10 then it should start with 10 and end to 100
initial value = 10
end value = 100
so ...
-2
votes
1
answer
67
views
Create separate object of unique keys from array of object, JavaScript [closed]
How can we make separate objects of unique keys?
Below is the sample array:
var arr = [
{"name": "john"},
{"email": "[email protected]"},
{"phone": ...
-2
votes
1
answer
47
views
Java script create new array grouped by object properties [closed]
I am learning Java script and trying to merge an Array of objects depending on the specific properties of that object.
For example I have the following array which contains objects of properties a,b,c,...
-4
votes
1
answer
37
views
Objects of array Group by object key
I have done a number of iterations but haven't achieved by expectation.
I have array of Object like one pair below
const data = [
{
"credit_account_id": "244",
...
0
votes
2
answers
2k
views
Fetching JSON data from array's array list in javascript
I am using JSON to store and retrieve some values from json file. I am trying to fetch the JSON data using javascript. The JSON data has array in array list. I am able to fetch the object list but ...
-1
votes
1
answer
74
views
Removing duplicates fromarray of objects
I have an array of objects as myData which consists of the below JSON structure:
const data = {
myData: [
{ Type: 'REAL', Tenure: '12', Name: 'WEBPAGE' },
{ Type: 'REAL', Tenure: '...
0
votes
1
answer
517
views
How do I access the second element in the nested array of "BLEED_PID"?
I want to get the value 45 from the "BLEED_PID" from ALL the nested arrays. Any help would be appreciated!
I am trying something await data.map(a => a.BLEED_PID.map(b =>b[1])) but its ...
0
votes
2
answers
1k
views
How to pass a List of String to a Object, when every string value have a key=value
I'm new to JavaScript and would like to know if there is a better way to transform a list string to an object.
From a service I get the following list, but I need to transform it to an object to be ...
0
votes
1
answer
123
views
Name from Objects is undefined
im having a problem with a value from an object. I dont understand why is undefined??
Im getting these data from endpoint and storing in state like this:
const [manualdata, setManualData] = useState([]...