extractMap method
Return an Option that conditionally accesses map keys if they contain a value
with a Map
value.
Useful for accessing nested JSON.
{ 'test': { 'foo': 'bar' } }.extractMap('test'); /// `Some({ 'foo': 'bar' })`
{ 'test': 'string' }.extractMap('test'); /// `None()`
Implementation
Option<Map<K, dynamic>> extractMap(K key) => extract<Map<K, dynamic>>(key);