質問編集履歴
2
っs
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
その上でtype,kbnごとにサマリーを行いたいです。
|
10
10
|
|
11
|
-
foreachで愚直に取る方法しか思い付かず、スマートに
|
11
|
+
foreachで愚直に取る方法しか思い付かず、スマートに取得することは可能でしょうか?
|
12
12
|
|
13
13
|
|
14
14
|
|
1
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,71 +14,73 @@
|
|
14
14
|
|
15
15
|
例としては、以下のような配列があったとすると
|
16
16
|
|
17
|
+
|
18
|
+
|
17
19
|
```
|
18
20
|
|
19
|
-
|
21
|
+
hoge
|
20
22
|
|
21
|
-
|
23
|
+
[
|
22
24
|
|
23
|
-
|
25
|
+
"type"=> '001',
|
24
26
|
|
25
|
-
|
27
|
+
"kbn"=> 'AAA',
|
26
28
|
|
27
|
-
|
29
|
+
"tax"=> 1,
|
28
30
|
|
29
|
-
|
31
|
+
"amount"=> 100
|
30
32
|
|
31
|
-
|
33
|
+
]
|
32
34
|
|
33
|
-
|
35
|
+
[
|
34
36
|
|
35
|
-
|
37
|
+
"type"=> '002',
|
36
38
|
|
37
|
-
|
39
|
+
"kbn"=> 'AAAA',
|
38
40
|
|
39
|
-
|
41
|
+
"tax"=> 1,
|
40
42
|
|
41
|
-
|
43
|
+
"amount"=> 100
|
42
44
|
|
43
|
-
|
45
|
+
]
|
44
46
|
|
45
|
-
|
47
|
+
fuga
|
46
48
|
|
47
|
-
|
49
|
+
[
|
48
50
|
|
49
|
-
|
51
|
+
"type"=> '001',
|
50
52
|
|
51
|
-
|
53
|
+
"kbn"=> 'AAA',
|
52
54
|
|
53
|
-
|
55
|
+
"tax"=> 1,
|
54
56
|
|
55
|
-
|
57
|
+
"amount"=> 100
|
56
58
|
|
57
|
-
|
59
|
+
]
|
58
60
|
|
59
|
-
|
61
|
+
[
|
60
62
|
|
61
|
-
|
63
|
+
"type"=> '002',
|
62
64
|
|
63
|
-
|
65
|
+
"kbn"=> 'AAA',
|
64
66
|
|
65
|
-
|
67
|
+
"tax"=> 1,
|
66
68
|
|
67
|
-
|
69
|
+
"amount"=> 100
|
68
70
|
|
69
|
-
|
71
|
+
]
|
70
72
|
|
71
|
-
|
73
|
+
[
|
72
74
|
|
73
|
-
|
75
|
+
"type"=> '001',
|
74
76
|
|
75
|
-
|
77
|
+
"kbn"=> 'BBB',
|
76
78
|
|
77
|
-
|
79
|
+
"tax"=> 1,
|
78
80
|
|
79
|
-
|
81
|
+
"amount"=> 100
|
80
82
|
|
81
|
-
|
83
|
+
]
|
82
84
|
|
83
85
|
```
|
84
86
|
|