value fields = HashMap<String, String>();
dynamic {
obj = data
for (k in _keys(obj)) {
String v1 = k;
v2 = obj[k]
Anything v3 = obj[k];
fields.put(k.lowercased, k)
}
}
--
You received this message because you are subscribed to the Google Groups "ceylon-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceylon-users+unsubscribe@googlegroups.com.
To post to this group, send email to ceylon...@googlegroups.com.
Visit this group at https://groups.google.com/group/ceylon-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceylon-users/7622b65d-ad1f-420c-8da0-6a4b0e964a71%40googlegroups.com.
value fields = HashMap<String,Anything>();
value ignore = ["$$", "getT$name", "getT$all", "string", "$prop$getString", "hash", "$prop$getHash"];
dynamic {
obj = data;
for (k in _keys(obj)) {
if (!ignore.contains(k)) {
dynamic v = obj[k];
try {
fields.put(k.lowercased, v);
} catch (Throwable t) {
print("-----");
print(k); // gives timestamp1
print(v); // gives Tue Oct 04 2016 16:16:55 GMT+0200 (CEST)
print(_isDate(v)); // gives true
}
}
}
}