回答編集履歴
2
インデント
test
CHANGED
@@ -38,45 +38,39 @@
|
|
38
38
|
|
39
39
|
var obj = JObject.Parse(@"
|
40
40
|
|
41
|
-
{
|
42
|
-
|
43
|
-
""items"": [
|
41
|
+
{ ""items"": [
|
44
42
|
|
45
43
|
|
46
44
|
|
47
45
|
{
|
48
46
|
|
49
|
-
|
47
|
+
""itemId01"": ""
|
50
48
|
|
51
|
-
|
49
|
+
""itemName01"": ""商品01""
|
52
50
|
|
53
51
|
|
54
52
|
|
55
53
|
},
|
56
54
|
|
57
|
-
|
55
|
+
{
|
58
56
|
|
59
|
-
|
57
|
+
""itemId02"": ""item02"",
|
60
58
|
|
61
|
-
|
59
|
+
""itemName02"": ""商品02""
|
62
60
|
|
63
61
|
|
64
62
|
|
65
63
|
},
|
66
64
|
|
67
|
-
|
65
|
+
{
|
68
66
|
|
69
|
-
|
67
|
+
""itemId03"": ""item03"",
|
70
68
|
|
71
|
-
|
69
|
+
""itemName03"": ""商品03""
|
72
|
-
|
73
|
-
|
74
70
|
|
75
71
|
}
|
76
72
|
|
77
|
-
|
73
|
+
]}
|
78
|
-
|
79
|
-
}
|
80
74
|
|
81
75
|
");
|
82
76
|
|
@@ -106,7 +100,7 @@
|
|
106
100
|
|
107
101
|
{
|
108
102
|
|
109
|
-
|
103
|
+
Console.WriteLine(property.Key);
|
110
104
|
|
111
105
|
printKeys(property.Value);
|
112
106
|
|
1
追記
test
CHANGED
@@ -106,13 +106,7 @@
|
|
106
106
|
|
107
107
|
{
|
108
108
|
|
109
|
-
if (property.Key.StartsWith("itemId"))
|
110
|
-
|
111
|
-
{
|
112
|
-
|
113
109
|
Console.WriteLine(property.Key);
|
114
|
-
|
115
|
-
}
|
116
110
|
|
117
111
|
printKeys(property.Value);
|
118
112
|
|
@@ -144,8 +138,6 @@
|
|
144
138
|
|
145
139
|
.OfType<JProperty>()
|
146
140
|
|
147
|
-
.Where(a => a.Name.StartsWith("itemId"))
|
148
|
-
|
149
141
|
.Select(a => a.Name)
|
150
142
|
|
151
143
|
.ToList();
|