| Line 190: |
Line 190: |
| | | | |
| | console.log("Within partition: " + ect ); | | console.log("Within partition: " + ect ); |
| − | future_temp_obj.push( checkdive( temp_obj[ ect ], moving ) ); | + | if ( Array.isArray( moving ) ){ |
| | + | |
| | + | var move_holder = temp_obj[ect]; |
| | + | Object.keys( moving ).forEach( function( move ) { |
| | + | move_holder = checkdive( move_holder, move ); |
| | + | }); |
| | + | if ( move_holder !== undefined ) { |
| | + | future_temp_obj.push( move_holder ); |
| | + | } |
| | + | |
| | + | } else { |
| | + | |
| | + | future_temp_obj.push( checkdive( temp_obj[ ect ], moving ) ); |
| | | | |
| | + | } |
| | }); | | }); |
| − | temp_obj = future_temp_obj; | + | |
| | + | if ( future_temp_obj !== undefined ){ |
| | + | temp_obj = future_temp_obj; |
| | + | } else { |
| | + | console.log('nothing to see here') |
| | + | } |
| | | | |
| | } else { | | } else { |
| Line 200: |
Line 218: |
| | | | |
| | console.log("data is on an objective level"); | | console.log("data is on an objective level"); |
| − | future_temp_obj = checkdive( temp_obj, moving ); | + | |
| | + | if ( Array.isArray( moving ) ){ |
| | + | |
| | + | var move_holder = temp_obj; |
| | + | |
| | + | Object.keys( moving ).forEach( function( move ) { |
| | + | move_holder = checkdive( move_holder, move ); |
| | + | }); |
| | + | if ( move_holder !== undefined ) { |
| | + | future_temp_obj.push( move_holder ); |
| | + | } |
| | + | |
| | + | } else { |
| | + | |
| | + | future_temp_obj.push( checkdive( temp_obj[ ect ], moving ) ); |
| | + | |
| | + | } |
| | + | |
| | if ( future_temp_obj !== undefined ){ | | if ( future_temp_obj !== undefined ){ |
| | temp_obj = future_temp_obj; | | temp_obj = future_temp_obj; |