Skip to main content

All Questions

0 votes
2 answers
79 views

Building a string with substrings at specified locations

I have 2 substrings, const string1 = '1111'; const string2 = '2222'; . I want to build a string where the first 4 indexes are empty , string1 occupying 5th to 10th index and then later followed by ...
VA1267's user avatar
  • 325
-5 votes
2 answers
91 views

How can I sort an array?

I have a backend in node.js, where I generate this array - let allItems = Array.from({ length: 1_000_000 }, (_, index) => ({ id: index + 1, title: `Title ${index + 1}`, isSelected: false, }));...
IJustStartedLearningCode's user avatar
0 votes
0 answers
47 views

Get the specific value from array list based on the key value in Javascript [duplicate]

I have an array of below type, [{ "type":"G", "amount":"123", "penamount":"110" },{ "type":"N", "amount&...
H Varma's user avatar
  • 738
-2 votes
1 answer
139 views

FlatMap vs Reduce for extracting data from a nested object

I have a dataset as such, where there may be multiple testResults array elements, along with there being 1 or many response array elements; and I an wanting to extract all of the potential ...
physicsboy's user avatar
  • 6,398
0 votes
1 answer
64 views

Pending promise stored as property in object array, do not know how to access to fulfill

I'm trying to fill an array of objects with specific property values and am using Promises with async/await with Javascript in a Node.JS environment. Here is the main part: getPublicNotes(...
PatW's user avatar
  • 31
0 votes
1 answer
51 views

Group Array Object nested object by key and Iterate Through Them

I have an array object with nested objects inside. In each object of the array object is a nested object, i want to do the following: Iterate through the testInfo property of the participantDetails ...
Raul Hernandez's user avatar
0 votes
2 answers
62 views

How to compare two arrays at the index and also include null values in the new array output

So I am very new to coding and have run into an issue when it comes to comparing arrays, especially ones that are nested and trying to pull out values that match using their indices into a new array. ...
too twiisted's user avatar
0 votes
2 answers
52 views

Array change listener callback not getting arguments

So I've been scratching this mental itch and was checking out how to handle change listeners to arrays without using Observables or external libraries. The main idea is that I have a .json file which ...
Zed_Blade's user avatar
  • 1,081
0 votes
0 answers
46 views

I can not pass an array to Airtable create method in Nodejs

I am trying to use Airtable for the first time. I want to simply create a record into a table in Airtable. The record is an array of objects. When I had the data as an object, it went through. But it ...
valve's user avatar
  • 45
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 ...
Henrik's user avatar
  • 13
-2 votes
1 answer
40 views

Does the concept of Index is available for LinkedList in DSA?

Does LinkedList have index to get accessed, as how we have it for array?? If yes, please let me know how the index work in LinkedList concept?? Thanks I am beginner with LinkedList and wanted to ...
sanup divakaran's user avatar
1 vote
0 answers
102 views

Variables from buffer in nodejs

I am studying pure nodejs, no express, no fastify and other frameworks that's why I don't need npm mutler and file-upload. I am sending 2-3 mp3 files and two txt files from a client side to a nodejs ...
Constantin Konstantin's user avatar
1 vote
0 answers
41 views

How to replace/fill div values in the Table.Cell React

I have a React table and I want to load all general data on the loading. And data that is not already loaded, I want it to be stored like empty lines. For example, I have a Table.Cell in the Table.Row ...
Programmer's user avatar
-3 votes
1 answer
120 views

Converting 2-column text file to key/value pairs [closed]

I am currently learning Node.js and Express. I'm trying to convert a text file into key-value pairs. My staircase program works like this: The provided text file looks like this (with 300 lines): I ...
Lisa S's user avatar
  • 11
1 vote
2 answers
101 views

Problem when performing a push to a nested array in mongodb and nodejs

I am having a problem when performing a push to a nested array, I am trying to add one or more objects within the nested array "fieldList", when I execute the push it tells me ok but when I ...
Gianni Narracci's user avatar

15 30 50 per page
1
2 3 4 5
267