JsonValue& JsonObjectBase::operator[](JsonKey key) { KeyValuePair* match = getMatchingPair(key); if (match) return match->value; JsonValue* value; if (count < capacity) { items[count].key = key; value = &items[count].value; count++; } else { value = &nullValue; } value->reset(); return *value; }