質問編集履歴
1
コメント部分を修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -46,11 +46,11 @@
|
|
46
46
|
|
47
47
|
```ruby
|
48
48
|
|
49
|
-
const fb = obj["facebook"]&.["token"];
|
49
|
+
const fb = obj["facebook"]&.["token"]; # => 'xxx'
|
50
50
|
|
51
|
-
const tw = obj["twitter"]&.["token"];
|
51
|
+
const tw = obj["twitter"]&.["token"]; # => nil
|
52
52
|
|
53
|
-
const ig = obj["instgram"]&.["token"];
|
53
|
+
const ig = obj["instgram"]&.["token"]; # => nil
|
54
54
|
|
55
55
|
```
|
56
56
|
|
@@ -64,11 +64,11 @@
|
|
64
64
|
|
65
65
|
```python
|
66
66
|
|
67
|
-
const fb = obj["facebook"]["token"] if "facebook" in obj and "token" in obj["facebook"] else None
|
67
|
+
const fb = obj["facebook"]["token"] if "facebook" in obj and "token" in obj["facebook"] else None # => 'xxx'
|
68
68
|
|
69
|
-
const tw = obj["twitter"]["token"] if "twitter" in obj and "token" in obj["twitter"] else None
|
69
|
+
const tw = obj["twitter"]["token"] if "twitter" in obj and "token" in obj["twitter"] else None # => None
|
70
70
|
|
71
|
-
const ig = obj["instagram"]["token"] if "instagram" in obj and "token" in obj["instagram"] else None
|
71
|
+
const ig = obj["instagram"]["token"] if "instagram" in obj and "token" in obj["instagram"] else None # => None
|
72
72
|
|
73
73
|
```
|
74
74
|
|