The nested-array tag has no wiki summary.
0
votes
2answers
31 views
Sorting nested arrays via an Element in each Sub Array
Assuming I have something coming back from a JSON request that essentially looks like this --
$data = array('0'=> array('name' => 'Dr. Smith',
'address' => '3002 ...
0
votes
3answers
42 views
How can i sort Nested JSON Array?
How can i sort Nested JSON Array? Like for a JSON below...
{
"id":"rtmc05.lax.someabc.net",
"name":"rtmc05.lax.someabc.net",
"tenants":[{
"id":"rtmc",
"name":"rtmc"
...
0
votes
2answers
40 views
PHP create_function with nested arrays
I need to use create_function because the server the application is running on has an outdated version of PHP.
The issue is that the items I pass into usort are arrays and I need to sort by a value ...
0
votes
2answers
137 views
MongoDB: How to query nested arrays?
I’m trying to build a simple blog system in PHP with MongoDB just to give Mongo a try but I’ve ran into some difficulties querying it.
I’ve generated 2000 random posts where each blogpost document ...
0
votes
2answers
77 views
How to fetch data from a Nested Array according a key in a array
Hello frnds actually i have a array of arrays as given below:-`
parrent array{
PrArr =
(
{
dt = "01-Apr-2012 11:15 PM\n";
dur = ...
0
votes
3answers
164 views
Ruby map! function and nested array
I need to find the distance between the 2nd and 3rd elements of each nested element so
nested_array = [[0, 3, 4], [1, 20, 21], [2, 2, 2]]
def pythag_theorem(a, b)
c = (a * a) + (b * b)
...
2
votes
1answer
89 views
Reorder Ruby array based on the first element of each nested array
My goal is to convert a into b:
a = [["a","b"], ["d", "c"], ["a", "o"], ["d", "g"], ["c", "a"]]
b = [[["a","b"], ["a", "o"]], ["c", "a"], [["d", "c"], ["d", "g"]]
They are grouped by the first ...
0
votes
1answer
57 views
Javascript Nested-Array throwing 'TypeError' - Error
I'm trying to create a nested array in Javascript, but whatever I try to get something out of this array I get an error 'TypeError'. Here is the code snippet:
var domains =new Array();
...
1
vote
4answers
73 views
javascript - stop pushing array into array
I'm currently working on a Javascript project. I need to take specific data from a large json dataset and store it in an array for later use. This is my code so far:
publicationArray = [] = ...
2
votes
1answer
71 views
Nested array, get items with same key
I have a small tricky question with nested arrays. I am getting something like that from my database:
array
0 =>
array
'id' => string '81' (length=2)
'value' => string ...
0
votes
0answers
24 views
How to map dynamic hash table to RDBM, e.g. run-time nested PHP Array to MySQL SQLite
If I have a dynamic nested data structure with no schema, what approaches can I take to map it to RDBM?
For instance (dot notation): Bob has properties Bob.Age=25 and has Bob.Children[0]=John and ...
0
votes
1answer
166 views
mongodb updating nested array in a document using PHP
document structure example is:
{
"dob": "12-13-2001",
"name": "Kam",
"visits": {
"0": {
"service_date": "12-5-2011",
"payment": "40",
"chk_number": "1234455",
...
1
vote
3answers
72 views
Extracting a Subset Key from an Array
I am working on a theme options page and trying to send the css key to my php css file. I can select the array key from the parent array but i do not know how to grab the css key from the subset. Can ...
1
vote
4answers
64 views
Is it possible to have an array containing both arrays and primitives in Java?
I'm doing a project in Java in which I'm looking at the frequency characters occur after each other character in a text. When I'm collecting my results, I'm storing them in a 2d array of ints. ...
0
votes
1answer
269 views
KnockoutJs beta 3.0 - How do you destroy child elements?
Currently i have a setup that looks like this:
ko.applyBindings(viewModel);
$(".removeButton").live("click", function() {
viewModel.ProductCategories.destroy(ko.dataFor(this));
...
0
votes
4answers
60 views
PHP displaying multidimensional array
I have this array similar to this:
$suppliers = array(
'Utility Warehouse' => array('Gas' => array(0,0), 'Electricty' => array(0,0)),
'British Gas' => array('Gas' => array(93,124), ...
0
votes
2answers
133 views
Compare multi dimentional arrays in javascript
I would like to compare 2 "multidimensional" arrays (arrays nested in arrays).
var old_dataArray=new Array(("id-2", "message", "user"), ("id-1", "message", "user"), ("id-0", "message", "user"));
var ...
0
votes
1answer
132 views
PHP to Smarty, displaying some nested Arrays
I'm having some issues displaying some nested array results in smarty... here's what I have:
$searchResults - an array, where each row is a result set. No problem here.
$searchResults[$row][users][] ...
1
vote
1answer
330 views
Ruby, Append value to existing value for key value pair in hash table
I have a nested hash table.
If i write
json.each{|key, value|
puts value;
puts;
puts value[x];
puts;
puts value[x][0];
}
I get a result along the lines of
Title1
name1
...
0
votes
1answer
430 views
Nested templates
I have the following code
<script type="text/javascript">
//<![CDATA[
/* JavaScript */
function Session(name, index) {
this.Messages = [];
this.Name = name;
...
0
votes
1answer
77 views
MYSQL Query statment to replace PHP loops
Suppose i have the following tables :
projects( project_id , project_name )
documents( document_id,document_name
, project_id)
which is kind of top-down hierarchically , i use select statement ...
0
votes
2answers
108 views
force nested array [closed]
I have the following code which returns a simple array if one result is found and a nested array if more.
$query = @mysql_query( $q );
if ( $query ) {
$this->num_rows = mysql_num_rows( $query ...
0
votes
2answers
85 views
Nested Array Troubleshoot for Perl
I am having trouble with my array of references which point to another array. Here's a snippet of my code:
# @bah is a local variable array that's been populated, @foo is also initialized as a global ...
0
votes
1answer
505 views
Printing a subarray in an array in smarty (foreach)
I'm trying to print a subarray in an array with the smarty template engine. Say I have an array structure like this:
Array
(
[0] => Array
(
[directory] => One Day As A Lion - ...
0
votes
1answer
463 views
Search in Nested Tables and Insert the result into new Nested Table!
How can I insert result of an WITH SELECT into a Nested Array (with two attributes) in it?
Here are the DDL and DML SQLs;
Don't worry about the NUMBER( 8 )
CREATE OR REPLACE TYPE DATE_RANGE IS ...
0
votes
1answer
440 views
How to create nested php arrays recursively?
I have some data in this format:
one,one
two,two
sub_one,one
sub_two,two
sub_sub_one,sub_one
sub_sub_two,sub_two
sub_sub_sub_one,sub_sub_one
sub_sub_sub_two,sub_sub_two
Now I want to create nested ...
0
votes
4answers
175 views
Nested named parameters in PHP
Named parameters are great for a long list of options in a PHP user defined function or class. But what about nested options?
Eg:
function foobar($foo,$bar,$options=array()) {
$default_options ...
0
votes
1answer
612 views
Using NSPredicate in 2D Arrays
This question is based off of the same app/source from my previous question which can be found here:
How to manage memory using classes in Objective-C?
I have a nested array which looks something ...
3
votes
3answers
122 views
Abstracting boxed array structures in J
I've been working on a J function for a while, that's supposed to scan a list and put consecutive copies of an element into separate, concatenated boxes. My efforts have taken me as far as the ...
0
votes
1answer
440 views
using nested arrays by php http_build_query() and recieve them in flash AS3
i am having this hard time figuring what is needed to do,
i am using URLVariables to send/recieve values between flash and PHP
the problem is, i am unable to access nested arrays ( array inside an ...