Tagged Questions
-1
votes
1answer
39 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
117 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;
...
1
vote
1answer
82 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 ...
1
vote
0answers
129 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', ...
0
votes
1answer
402 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
414 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
149 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
2answers
73 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
302 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 ...
0
votes
2answers
243 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. ...
0
votes
1answer
137 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
145 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 = [] = ...
0
votes
1answer
724 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
2answers
498 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
897 views
Nested templates
I have the following code:
function Session(name, index) {
this.Messages = [];
this.Name = name;
this.Index = index;
}
var vm = {};
vm.Sessions = ko.observableArray([new Session("Foo", ...