All Questions
Tagged with list javascript
1,979 questions
0
votes
2
answers
51
views
how to access the original nested list after modifying it in loop? [duplicate]
I am modifying the nested list and adding to an array now when I modify nested list it behaving very strangely, I am missing something very small but don't know what.
class Square {
constructor() {
...
1
vote
2
answers
52
views
how to change the order of inputs in this extension app to make the newest lead at the top instead of the bottom
As you can see if u tried the code and save an input in the app it will be save in a top to bottom order and i want it to be from bottom to top order, here is the whole code and if you want the html ...
-1
votes
2
answers
48
views
Using Javascript, filter between 2 list of objects but the condition to be dynamic [duplicate]
I have 2 list of objects. One is the data and the other is the include conditions. I would want to device a filter in such a way that if the list that include conditions, has more properties added, it ...
0
votes
0
answers
58
views
I can't seem to reflect my lists with my updated data whenever position is changing
I've been sitting with this problem for days, and I can't quite figure out what's wrong with my code.
My problem is that whenever my data gets re-ordered or change position, like changing the tabs ...
0
votes
1
answer
77
views
How to get the key from a list obj in html-javascript
I have an array of obj for employees and when the user tries to delete on of them there is a message popping up asking them if they want to continue with the proccess. If they press yes the employee ...
1
vote
1
answer
80
views
Select parent node from a javascript object
From a list like this
table:any[] = [
{
name: 'A1 - John Doe',
icon: 'user-name',
bold: true,
code: 'NY',
open: false,
items: [
{
name: '...
0
votes
0
answers
24
views
How can i list root objects JavaScript [duplicate]
So I have several objects and classes in my script tag
const Main = {}
const App = {}
class Game {}
let state = 777
etc. I'd like to list them.
I've tried
Object.keys(Object.getOwnPropertyDescriptors(...
1
vote
1
answer
48
views
code not performing as desired and generating an item both as a list and a sublist item
You click an item on the dropdown, then click the button and it adds it to a list on the right. Once the item is on the right, I have the option to add a note to it. The problem I'm facing is that the ...
0
votes
0
answers
43
views
How to see if object is in a list [duplicate]
How do I in Node.JS check if a object like {idx: X, idy: y} in is in a list?
I've tried with .index and other things, but I think because it is a object with multiple values it fail.
My list has the ...
0
votes
1
answer
82
views
How can I use lua language json.encode without breaking the order of the list?
I have a list like below in Lua, I send this list to the js side in json format using json.encode() code. But the problem is that the order of this list is changed by json.encode every time. So my ...
0
votes
3
answers
50
views
How to call a list from app.js to a component in react js
I am trying to set a state in a component and transfer that list from one component to another. But getting console error as List.map() is not a function!
I am trying to get webpage as enter image ...
-1
votes
1
answer
42
views
why is my program giving back undefined values for my roman numeral convert?
I am trying to create a roman numeral converter using javascript, css, and html, but whenever I try to get the value of the roman numeral I need it returns undefined and I am unsure as to why.
const ...
2
votes
2
answers
90
views
How to get all possible combinations of multiple lists with different indexes only in javascript? [duplicate]
Let's pretend I have the following lists:
const list1 = [1,2,3,4,5]
const list2 = [6,7,8,9,10]
const list3 = [11,12,13,14,15]
const list4 = [16,17,18,19,20]
How do I get all possible combinations but ...
1
vote
1
answer
43
views
How do I sort specific elements in list in javascript?
In javascript, I want to sort specific elements which are represented by variables in list in automatic way.
const PHQ = [
{
q: '1',
a: [
{ answer: '1', type: ['a']},
{ answer: '...
-1
votes
2
answers
176
views
How to append li element, to another list
I have a list that i want to append another list on certain conditions.
The structure looks like this:
<ul class="menu">
<li class="list-1"><ul class="ul-1"...