Support lowercase name in from_entries (fix #990)

This commit is contained in:
David Tolnay committed 2015-10-17 20:50:40 -07:00
1 parent 32e5e6af4b
commit c8dc164566
3 files changed
+4 -8

No files matched your search

+2 -6
View File
@@ -1072,12 +1072,8 @@ to_entries
[{"key":"a", "value":1}, {"key":"b", "value":2}]
from_entries
[{"key":"a", "value":1}, {"Key":"b", "value":2}]
{"a": 1, "b": 2}
from_entries
[{"key":"a", "Value":1}, {"Name":"b", "value":2}]
{"a": 1, "b": 2}
[{"key":"a", "value":1}, {"Key":"b", "Value":2}, {"name":"c", "value":3}, {"Name":"d", "Value":4}]
{"a": 1, "b": 2, "c": 3, "d": 4}
with_entries(.key |= "KEY_" + .)
{"a": 1, "b": 2}