In Dart language how to get MAP keys by values?
I have a Map like;
{
\"01\": \"USD\",
\"17\": \"GBP\",
\"33\": \"EUR\"
}
And I n
If someone still need a solution, I wrote a simple library to deeply (search inside nested maps either) search by value inside Map
. Usage is simple, because deepSearchByValue()
is an extension method, so all you need to do is to import my library and call the method on your map:
import 'package:deep_collection/deep_collection.dart';
void main() {
print({
"01": "USD",
"17": "GBP",
"33": "EUR",
}.deepSearchByValue((value) => value == 'USD'));
}