An array is an ordered data structure consisting of a collection of elements. Nested array is collection of array. Use this tag for questions related to nested-array.

learn more… | top users | synonyms

0
votes
1answer
45 views

Meteor Multiple Find Multiple

Developing a new app in Meteor, which I have little experience in. Just got handlebars/blaze figured out I think, now Mongo.. I have a database filled with records like this (3000+ atm, production ...
0
votes
3answers
68 views

How to parse nested arrays with Jackson?

I used to successfully parse the following .json file: [ { "latitude": 49.419459253939316, "longitude": 8.676411621072491 }, { "latitude": 49.41946061080915, ...
0
votes
1answer
39 views

print values of a nested array php

First let me say that I have gone through a lot of related question on here but none of them solve my issue. I have and php nested array in db and need to print the all the values. the output prints ...
-1
votes
1answer
30 views

How do I access a 2D array in JavaScript, or D3.JS

I want to access the data in the second array from the following code: var data = [ ["Team 1", 3], ["Team 2", 6], ["Team 3", 9]]; I am trying to access the "team" and "team number" using the ...
0
votes
1answer
39 views

PHP Extract value from nested array and place in a loop to echo value

I'm trying to extract the virtual machine names that are being pulled from a vcenter server via the below SOAP requests. Whilst I'm getting the results (see the var_dump below), I can't figure out how ...
3
votes
1answer
41 views

“Flattening” a cell array

I have created a function which takes vectors for input variables and returns a cell array for each set of inputs. The final output variable (out) seems to consist of a 2x1 cell containing two 1x5 ...
-1
votes
1answer
29 views

PHP - Method For Sorting Array By Nested Arrays Value [duplicate]

I have a php function which builds an array with category data like so: $categories = array(); foreach($catIds as $catId) { $category = ...
0
votes
2answers
32 views

Nested array in android

I want to make/handle nested array in android. My nested array will be similar to this. [array name] = [1] = [1] = a [2] = b [3] = d [2] = [1] ...
1
vote
2answers
32 views

Recursively chain specific values together without passing an array by reference

Imagine the following multi-dimensional array: $a = array( 'key' => 'hello', 'children' => array( array( 'key' => 'sub-1' ), array( 'key' => 'sub-2', ...
0
votes
1answer
91 views

Populate jquery form from nested array of $_POST

PHP form uses a jquery script to add fields and sub-fields based on http://jsfiddle.net/L3s3w/4/. $(function(){ var nbIteration = 1; var detailIteration = 1; ...
0
votes
1answer
24 views

Assigning user-determined coordinates to a nested array

I have two integers, range1 and range2, and a nested integer array distance[][]. I also have two integer arrays, elasticity[] and resistance[], both containing a group of user-determined values. The ...
1
vote
2answers
56 views

how to find a element in a nested array and get its sub array index

when searching an element in a nested array, could i get back it's 1st level nesting index. <?php static $cnt = 0; $name = 'victor'; $coll = array( 'dep1' => array( 'fy' => ...
0
votes
2answers
43 views

Generate nested array codeigniter

For a graph I'm working on, I'm trying to generate a nested array. I'm querying the database to try and get all the data from a certain column in my database as an array, but i'm not really quite sure ...
1
vote
2answers
56 views

Why is my code making PDO return nested arrays?

I'm sure I must be doing something wrong, but I can't seem to find an answer anywhere (at least neither in the documentation nor on SO as of yet). I am a beginner in PHP and SQL. I have this simple ...
0
votes
1answer
29 views

NSpredicate Results

I have array compose of 2 dictionaries . The first dictionary is grouped by Services and gives me the numbers of Companies that has the same service in a array containing my second dictionary with all ...
0
votes
2answers
63 views

PHP Foreach Array building with nested array

This is in reference to a CRM I am building. I am trying to get data from phone contacts in my database and then separate them by the hour of day then filter through the contacts by each hour and ...
0
votes
2answers
55 views

Need to loop through an array that is inside of another array

I have an array that contains 2 objects. In order to store it on my backend server service, I need to store it inside of another array. So later on, when I call my server and tell it I want the array ...
1
vote
1answer
169 views

Searching in UItableview - Using Nested Array NSpredicate

I'm having a lot of trouble trying to figure out how to displays my filtered search results on the UItableview . My displays methods work very well ... but when I try to search for a specific data ...
0
votes
3answers
52 views

Display PHP array

I wanted to show everything what is on the arrays but it doesn't seems to show all information, and each server might have more than 2 partition, below I written was just 2 partition, other server ...
1
vote
1answer
187 views

nested array inserting in mongodb?

I am using Meteor where I have a mongodb document where something inserted with the following code: Poll_Coll.insert({question:quest,option1:[{pd:op1,ids:[]}], option2:[{pd:op2,ids:[]}], ...
1
vote
0answers
75 views

Assign_block_vars in multi-dimensional arrays

I have a unique problem that I cannot seem to find or figure out the answer to because I am trying to do a few things at once. I've tried researching each thing to find out the answer but it is ...
1
vote
0answers
93 views

Passing nested array as parameter for function in VBA results in compile error “Expected: =”

I am attempting to Construct an array (testSheets) that holds a file name and a file path as strings. I then wish to contain this array inside of another array (shtsTmpl). Then, I want to pass the ...
0
votes
1answer
54 views

projections and index on 2D nested arrays in mongodb

> db.foo.save({'foo': [{f0: 'a', f1: 'b'}, {f0: 'c', f1: 'd'}]}) > db.foo.save({'foo': [{f0: 'a', f1: 'e'}, {f0: 'f', f1: 'g'}]}) > db.foo.save({'foo': [['a', 'b'], ['c', 'd']]}) > ...
0
votes
1answer
39 views

Nested Match & Sum In Ruby

Currently I have this array = [["abc", [0.0, 1.0, 2.0, 3.0], "Testing"], ["efg", [1.0, 2.0, 3.0, 4.0], "Testing"]] Condition: if each of nested array index2 is the same then I want to sum up ...
1
vote
1answer
72 views

How to define nested array in javascript?

The webpage I'm developing retrieves (product) information from the database via an ajax call to a php file. Given the array structure and related json encoded nested string in the simplified php file ...
0
votes
2answers
33 views

Nested array to single array keeping the parents

The problem is to change a tree structure to a simple array structure, in which each child has the parents who belongs to, the example is a directories and files structure, but I'm looking for a ...
1
vote
0answers
107 views

Traverse nested Javascript arrays to create paths

I have an arbitrarily nested data structure like this - var nested = [ 'a', [ [ 'b' ], [ 'c' ] ] ]; I would like to traverse the levels to create an array of arrays like this var paths = [['a', ...
1
vote
4answers
57 views

Indexing a nested list in python

Given data as data = [ [0, 1], [2,3] ] I want to index all first elements in the lists inside the list of lists. i.e. I need to index 0 and 2. I have tried print data[:][0] but it output the ...
3
votes
2answers
96 views

Return matching nested array in Ruby

I have a nested "main" array and I am looking to return the results (the entire nested array) for elements matched in a second "match" array. I have been able to return the first value of the arrays ...
0
votes
2answers
214 views

Sort three level nested array in descending order with php

How to sort following array in descending order by sorder? The whole array is considered to be one array for descending sorting.I see some other questions like this but none of them helped me. ...
2
votes
1answer
562 views

MongoDB: Query nested arrays

I have been reading through old answers here to try to find a solution to this - but I haven't been successful. I have a field in a document that has a nested array as follows: [tags] => Array ( ...
0
votes
2answers
49 views

Get PHP array value [duplicate]

I have an array like the following: Array ( [0] => Array ( [0] => 1 [1] => 2 [2] => 3 ) [1] => Array ( ...
0
votes
2answers
34 views

Sorting three lists into a single list given that each list is sorted

I have three nested arrays, containing around 10,000 elements (each array has a different number of elements). These arrays are ordered with respect to the 0th element and the 1st element in each ...
0
votes
1answer
347 views

Json Nested Object Array to Table

I have a json file, there is an array of objects. In the first object is a 2nd array with +/- 200 objects. Is there a possibility to show the 2nd array in a new table in the last row of the first ...
0
votes
0answers
283 views

Delete item from nested object array

I'm working with AngularJS and have an object array like that in my controller : $scope.folderList = [{ name: 'root', path: 'uploads/', subs: [{ name: 'pictures', path: ...
0
votes
1answer
135 views

Convert a nested array to plain Arrays

I have an array like below var arr = [["a", "b"],[1],[5,6]]; I would like to convert it to plain JSON like below arr = [ ["a","a","b","b"] [1,1,1,1] [5,6,5,6] ] The logic is ...
1
vote
1answer
262 views

How can I assert on a Java Hashmap of Arrays?

I'm building a new hashmap ( < String , String[] > ) by combining three other hashmaps ( < String , String > ) and adding the filename. How do I assert the new hashmap is correct? The nested ...
0
votes
2answers
76 views

json array loop thru nested not working

I'm trying to loop thru my nested array of json objetcs.. Here's the loop: $("#test").text(""); for(var i=0;i<obj.length;i++){ $("#test").append(obj[i].line_item + ", ...
0
votes
2answers
113 views

Nested arrays in JSON

Can someone explain to me how to make a json that contains a nested an array within an array? Assuming I have two tables, the first is "group" and the second "students", and I want to make a json ...
-1
votes
2answers
152 views

Covert flat array to Nested Array in PHP

Given the following input: array('one/two/3', 'one/four/0/5', 'one/four/1/6', 'one/four/2/7', 'eight/nine/ten/11') How can I convert it into this: array( 'one': array( ...
1
vote
1answer
36 views

Sort nested array according to another array

This are my array $items = array( "100"=> array( 'id' => 15, 'category' => array('id'=>'100010'), 'description' => array('type'=>'Drink'), ), ...
0
votes
2answers
39 views

Returning a list of indices where a certain object appears in a nested array

I am trying to figure out how to form an array that collects every index of a particular object (in this case a single letter) where it appears in a nested set of arrays. For instance, using the array ...
1
vote
2answers
118 views

Proper syntax & structure for 2 nesting foreach() loops after a var_dump()

As en uneducated PHP person, I am beginning to confuse myself as I try to create & save a CSV file, made from data submitted from an online form. I am running in to massive troubles trying to ...
1
vote
1answer
224 views

numpy: iterate over nested array

Im trying to iterate over a nested (numpy) array using np.nditer(). Converted a nested list of ints to a nested numpy array. from numpy import mean, array, nditer nested_list = ...
1
vote
2answers
65 views

Problems with nested array after using unset

I have a dynamically built nested array from which i need to drop one or more indexes. Having scoured the php information pages, i found that using unset($quotes_array[0]['methods'][3]); would ...
0
votes
2answers
54 views

PHP: How to Fix Nested Array

I have been struggling with this nested array all night, so I finally decided to ask for some help on this. I am trying to correct this nested array I have below into something else. Please respond ...
2
votes
1answer
1k views

PHP: Efficient way to access nested array elements?

I am tidying up some old code i've come across on a job including various arrays which i'd like to combine into nested arrays and would like to know a simple way of looping throught the contents of a ...
1
vote
2answers
68 views

Using the Array methods with nested (multidementional ) arrays?

I am having problems when using Array methods with nested arrays. var map = [ ["Blank", "Blank", "Blank"], ["Blank", "Player", "Blank"], ["Blank", "Blank", "Blank"] ]; for ...
-3
votes
2answers
281 views

drop down menu with php array [closed]

I would like to change this menu so that if I choose the second report1 shows the menu that says if there is type1 otherwise go to the third menu with written about1. In all four menus. I think the ...
2
votes
2answers
55 views

Check nested array structure in mock class

I've written a method that basically looks like this: public function collectData($input, FooInterface $foo) { $data = array(); $data['products']['name'] = $this->some_method(); ...