@ignore safely extract an Array from dictionary or list :returns Array | None:
(self, dictionaryOrList, key1: IndexType, key2: str, defaultValue: List[Any] = None)
| 3022 | return(value is not None) and isinstance(value, dict) |
| 3023 | |
| 3024 | def safe_list_2(self, dictionaryOrList, key1: IndexType, key2: str, defaultValue: List[Any] = None): |
| 3025 | """ |
| 3026 | @ignore |
| 3027 | safely extract an Array from dictionary or list |
| 3028 | :returns Array | None: |
| 3029 | """ |
| 3030 | value = self.safe_value(dictionaryOrList, key1) |
| 3031 | if (value is not None) and isinstance(value, list): |
| 3032 | return value |
| 3033 | value2 = self.safe_value(dictionaryOrList, key2) |
| 3034 | if (value2 is not None) and isinstance(value2, list): |
| 3035 | return value2 |
| 3036 | return defaultValue |
| 3037 | |
| 3038 | def safe_list(self, dictionaryOrList, key: IndexType, defaultValue: List[Any] = None): |
| 3039 | """ |