Get a string value from a Map @param map Source map @param key The key @return The string value
(Map<String, Object> map, String key)
| 666 | * @return The string value |
| 667 | */ |
| 668 | public static String getString(Map<String, Object> map, String key) { |
| 669 | Object value = map == null || key == null ? null : map.get(key); |
| 670 | if (value == null) { |
| 671 | return null; |
| 672 | } |
| 673 | |
| 674 | return value.toString(); |
| 675 | } |
| 676 | |
| 677 | |
| 678 | public static Object getFromObjOrArr(Object parent, String k) { |