All Questions
8
questions
0
votes
3
answers
907
views
Map through a Javascript array of objects and return a new one satisfying a condition
Having the following data structure:
[
{
"items": [
{
"name": "View Profile",
"href": "/profile&...
0
votes
2
answers
103
views
Persist the key in an object after Object.keys(),map() and sort()
I got an object like this:
a = {
CustomKey1: [
{order: '2'},
{order: '1'},
],
CustomKey2: [
{order: '2'},
{order: '3'},
{order: '1'},
],
}
I need to sort based on ...
1
vote
2
answers
70
views
I'm trying to convert Object to Array of object in javascript
Here is the one object:
const language = {
fluency: {
"English": "Advanced",
"French": "Intermediate"
},
read: ["English", "French&...
0
votes
2
answers
2k
views
spread operator not working in react native
'browsed' is an array of objects with data for each letter:
[
{
allowMultiSign: undefined,
allowSingleSign: "1",
assignmentStatus: "Browsed",
disclaimer: null,
...
-1
votes
2
answers
110
views
javascript map object multidimension
i have this data structure:
tree = [
{
"name": "Men Section",
"categories": [
{
"name": "Clothings",
"Subcategories": [
{
"name": "Jackets"...
2
votes
5
answers
6k
views
reduce/filter array of objects by object key
Consider the following array of objects
const data = [{
name: 'James',
sex: 'male',
}, {
name: 'Mike',
sex: 'male',
}, {
name: 'Janet',
sex: 'female',
}, {
name: '...
0
votes
2
answers
45
views
Error mapping an array of objects in javascript reactjs
I have an object
const pipe = {
diameter: 200,
C: 120,
length: 40,
accesories: [
{name: "Bend 90°", k: 0.9, qtty: 2},
{name: "Gate Valve", k: 0.3, qtty: 1},
{name: "Butterfly valve", k: 0....
4
votes
5
answers
22k
views
how to create a map with unique keys from a parsed object in javascript es6/2015?
Lets say I receive a parsed json like below:
[{"a":1},{"a":2},{"a":3}]
The keys are the same which is a.
How do I make each a unique so that the map is usable?'
EDIT1:
Results I want:
let myMap ...