とりあえずjsの再帰処理
javascript
1const a=[
2 {x:1,y:100,z:[11,12,13]},
3 {x:2,y:200,z:[21,22,23]},
4 {x:3,y:300,z:[31,[100,"hoge"],33]},
5 ];
6const b=[
7 {x:1,y:100,z:[11,12,13]},
8 {x:2,y:200,z:[21,22,23]},
9 {x:3,y:300,z:[31,[100,null],33]},
10 ];
11const array_values=v=>{
12 var ret=[];
13 if(/Number|String|Null/.test(Object.prototype.toString.call(v))){
14 ret.push(v);
15 }else{
16 Object.values(v).forEach(x=>{ret=ret.concat(array_values(x))});
17 }
18 return ret;
19}
20const isnull_recursive=v=>{
21 var ret=false;
22 if(/Null/.test(Object.prototype.toString.call(v))){
23 ret=true;
24 }else if(!/Number|String/.test(Object.prototype.toString.call(v))){
25 Object.values(v).forEach(x=>{if(isnull_recursive(x)==true) ret=true;});
26 }
27 return ret;
28}
29console.log(isnull_recursive(a));
30console.log(isnull_recursive(b));
31console.log(array_values(a));
32console.log(array_values(b));