| Line 77: |
Line 77: |
| | | | |
| | Object.keys(read).forEach( function(path) { | | Object.keys(read).forEach( function(path) { |
| − | console.log("instructions are an object"); | + | console.log("instructions are an object, in path " + path); |
| | | | |
| | //|||||||||||||||||| Check if elements of instruction object are arrays themselves |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| | | //|||||||||||||||||| Check if elements of instruction object are arrays themselves |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |
| Line 85: |
Line 85: |
| | Object.keys(read[path]).forEach( function( path2 ) { | | Object.keys(read[path]).forEach( function( path2 ) { |
| | | | |
| − | console.log("instructions are an array of arrays"); | + | console.log("instructions are an array of arrays, going through " + read[ path ][ path2 ] ); |
| | future_return_partition = data_function( future_return_partition, read[ path ][ path2 ] ); | | future_return_partition = data_function( future_return_partition, read[ path ][ path2 ] ); |
| | //||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| | | //||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |
| Line 92: |
Line 92: |
| | }); | | }); |
| | // Put the result of the travel along the paths in array element of array into the future_instructional_return bunch | | // Put the result of the travel along the paths in array element of array into the future_instructional_return bunch |
| | + | console.log("arrived at") |
| | + | console.log(future_return_partition); |
| | future_instructional_return.push(future_return_partition); | | future_instructional_return.push(future_return_partition); |
| | | | |
| | } | | } |
| | | | |
| − | //|||||||||||||||||| If instruction array element is not an array anymore, lets just do one step |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| | + | //|||||||||||||||||| If instruction object element is not an array anymore, lets just do one step |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |
| | //|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| | | //|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |
| | | | |
| Line 124: |
Line 126: |
| | | | |
| | else { | | else { |
| − | data_function( temp_obj, read ); | + | temp_obj = data_function( temp_obj, read ); |
| | } | | } |
| | + | |
| | + | return temp_obj; |
| | } | | } |
| | + | |
| | + | |
| | + | |
| | | | |
| | | | |