operator [] method

dynamic operator [](
  1. String key
)

Read a key directly from the response Map.

Returns null if data is not a Map or the key does not exist.

Implementation

dynamic operator [](String key) {
  if (data is Map) return (data as Map)[key];
  return null;
}