---
title: "System::Text::Json::JsonHelpers::CreateDictionaryFromCollection method"
url: "https://reference.aspose.com/pdf/cpp/system.text.json/jsonhelpers/createdictionaryfromcollection/"
product: "Aspose.PDF for C++ API Reference"
description: "How to use CreateDictionaryFromCollection method of System::Text::Json::JsonHelpers class in C++."
---

## JsonHelpers::CreateDictionaryFromCollection method




```cpp
template<typename TKey,typename TValue> static System::SharedPtr<Collections::Generic::Dictionary<TKey, TValue>> System::Text::Json::JsonHelpers::CreateDictionaryFromCollection(System::SharedPtr<Collections::Generic::IEnumerable<Collections::Generic::KeyValuePair<TKey, TValue>>> collection, System::SharedPtr<Collections::Generic::IEqualityComparer<TKey>> comparer)
```

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Dictionary](../../../system.collections.generic/dictionary/)
* Class [IEnumerable](../../../system.collections.generic/ienumerable/)
* Class [KeyValuePair](../../../system.collections.generic/keyvaluepair/)
* Class [IEqualityComparer](../../../system.collections.generic/iequalitycomparer/)
* Class [JsonHelpers](../)
* Namespace [System::Text::Json](../../)
* Library [Aspose.PDF for C++](../../../)
