Most voted "array-push" questions
15 questions
Sort by count of
-
3
votes3
answers236
viewsCheck if array contains specific character
I need to check if an array has a specific character (this: | ). If it does, that character should be deleted and the next word that would be after that character (which is actually an item…
-
1
votes1
answer522
viewsSplit array with multiple INSERT array_push in SQL
I have a foreach that makes the loop in the data of a file, this loop generates some values that are inserted in a array with array_push, I need to break these values inserted in this array to…
-
1
votes1
answer161
viewsArray within Array
Good night, I am consuming a webservice and get the data in json with Curl. I have the data stored in the variable $data. What I need is this: Let’s assume that the variable $data has the following…
-
1
votes2
answers188
viewsreverse push order
I’m using the push in a request to put a new element in a list, but I noticed that the push puts the last result down there. I want to reverse that. I’m using v-for to list, but I believe that the…
-
1
votes1
answer164
viewsArray does not add data to the last element via the push method in a click function
Array does not add a data in the form in the last element via the push method in a click function. I did some research, but I couldn’t find a meaningful answer. The question is of beginner, I…
-
0
votes1
answer224
viewsHelp in Javascript contact list program
I have to make a simple Javascript program that will show the user’s contact list and allow him to enter a new contact, as in the image below and the description of the problem is as follows: Each…
-
0
votes1
answer85
viewsPush array only works inside callback
I am trying to update an array with values returned by Mongoose. But the array returns empty. It follows the code snippet: let y = []; Vendas.countDocuments( { dt_encerramento: { $gte: jan, $lte:…
-
0
votes2
answers117
viewsPicking up javascript arrays for sending in the form
<script type="text/javascript"> var nomess = []; function handleFileSelect() { var output = document.getElementById("resultt"); arquivos = $("#imagem").prop("files"); var nomes =…
php javascript array multidimensional-array array-pushasked 5 years, 9 months ago Richard Barcelos 21 -
0
votes1
answer32
viewsnativescript-Vue - Adding an object to a push array after zeroing the object adds a zeroed object
I am developing an app with nativescript-Vue where I have an address registration. I have the following data: data() { return { isRegistering: true, enderecos: [{ id: 1, descricao: 'Casa',…
-
0
votes1
answer473
viewsHow to insert the value of an Array within another Array
I’m trying to separate students according to their numbers in the notebook where students grade A would be students numbering over 170, students B students numbering 160 to 169 and students C…
-
0
votes1
answer240
viewsInclude or sum key/value type elements in a javascript array
I need to include in an array objects of the key/value type with information coming from the database, but if the key already exists in the array, the value must be added to what already exists.…
-
-1
votes3
answers3540
viewsHow to receive an array and return another
I have the following question: We need a function more less that takes an array and returns another with the following three numbers: in the first position, the fraction of numbers that are positive…
-
-1
votes1
answer26
viewsI am unable to iterate the array
I would like to popular this array with the Category object I get when I query findById. But the variable loggedUserCategories appears as an empty array in Sponse , however, I can visualize the…
-
-1
votes1
answer155
viewsPHP Mysql multidimensional array
I’m having a little trouble assigning an index to encompass the items marked in the figure below in a multidimensional array I’m mounting with the database queries: I need to take from another table…
-
-1
votes1
answer753
viewsTake data from an React Native array
I need to get data from a array of the server to display to the user. A is a show as if it were a feed of a social network, but is showing the same contents over and over again. componentDidMount =…