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
19 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
40 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
24 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
33 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
21 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
50 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
39 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
52 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
48 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
73 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
52 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
44 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
37 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
38 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
62 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
28 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
75 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
52 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
81 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
132 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. ...
1
vote
1answer
306 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
46 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
261 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
165 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
103 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
170 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
70 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
99 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
105 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
38 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
107 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 ...
0
votes
0answers
193 views

Asihttprequest success with addPostValue failed using appendPostData with ASP server

It's driving me crazy, after two days of test and searching the web, I still can't figure out what is wrong with my code. So, please help! I'm working on an iOS app get and post data from and to a ...
1
vote
1answer
177 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
60 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
52 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
786 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
64 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
257 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
46 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(); ...
0
votes
3answers
79 views

PHP - get a KEY of a nested array

I have an array called $plugins that looks something like this : Array ( [path/to/file.php] => Array ( [Name] => somevalue_a [TextDomain] => somevalue_b ...
1
vote
0answers
146 views

Restkit nested array mapping fault

I am trying to map following structure: Plan.json: { "id" : "1", "floors" : [ { "floor" : "1", "constrains" : { "southWest": { "latitude": ...
0
votes
4answers
241 views

convert Nested array into mysql query

I need to generate a mysql insert query with this array , where the column name are the field_name & values are field_values. i tried using implode, here its nested array & troubling me lot. ...
-1
votes
4answers
82 views

Creating Java arrays with the name of a variable [closed]

I am making a plugin for a Minecraft server and I need a way to store players in an array for the arena they are in. For example: The plugin loads all the created arenas: Arena1 Arena2 Arena3 And I ...
-1
votes
1answer
226 views

Ruby: iterate subarray and count items; write back count into element

I have an XML-File with <pb n="4-DIGIT-NUMBER" ... />. The number being in some cases identical, so I'd like to disambiguate, coming so far, but now problems with counting (do I have the right ...
0
votes
1answer
118 views

redim nested array

i have an array path... this array contains a list of nested array paths. it could look something like this: path( 0 1 2 3 4 5 6 7 8 ) "1" | 1, 1, 1, 1, 1, 1, 1, 1, 1 | "2" | 4, 3, 1, 4, 2, ...
0
votes
2answers
171 views

jquery javascript stop an undefined object from being evaluated in nested array iteration

I have an array of arrays and some of the inner arrays have yet another nested array. Some don't. I loop through the top level array elements and IF there is an internal array I loop through them. ...
1
vote
1answer
100 views
2
votes
1answer
2k views

Json.NET: deserialize nested arrays into strongly typed object

I'm writing client application, which should process server responses. Responses are in JSON. I decided to use Json.NET to deserialize them. And I couldn't simplify or modify those responses (on ...

15 30 50 per page