I want to add "_new" to the existing value if a key is present in the Dictionary object else want to keep it blank.
I have a dictionary object
"LanguageMapping": {
"LanguageMappingCode": {
"en-CA": "ca-en",
"fr-CA": "ca-fe",
"ab-GB": "gb-ab",
.....so on
}
}
I am using Linq to fetch the value from key.
_languageMapping.LanguageMappingCode.FirstOrDefault(x => x.Key == LanguageCode)Value
Currently, I am getting a response as "ca-en" if I pass key "en-CA" but I want a response as "ca-en_new".
Is it possible to achieve using Linq?