| 4113 | } |
| 4114 | |
| 4115 | public Object safeDictN(Object dictionaryOrList, Object keys, Object... optionalArgs) |
| 4116 | { |
| 4117 | /** |
| 4118 | * @ignore |
| 4119 | * @method |
| 4120 | * @description safely extract a dictionary from dictionary or list |
| 4121 | * @returns {object | undefined} |
| 4122 | */ |
| 4123 | Object defaultValue = Helpers.getArg(optionalArgs, 0, null); |
| 4124 | Object value = this.safeValueN(dictionaryOrList, keys, defaultValue); |
| 4125 | if (Helpers.isTrue(Helpers.isEqual(value, null))) |
| 4126 | { |
| 4127 | return defaultValue; |
| 4128 | } |
| 4129 | if (Helpers.isTrue(this.isDictionary(value))) |
| 4130 | { |
| 4131 | return value; |
| 4132 | } |
| 4133 | return defaultValue; |
| 4134 | } |
| 4135 | |
| 4136 | public Object safeDict(Object dictionaryOrList, Object key, Object... optionalArgs) |
| 4137 | { |