Let's say I want to store documents like the one below:
{
"item_id": 1,
"item_price": 500,
"currency": "USD"
}
I want the currency field to be like ENUM, so I can predefine the set of values, like: "USD", "GBP", "EUR" and so on...
I also would like that each value will be related to an integer, like hash map, so the set of values will look like this:
{ "USD":1, "GBP":2, "EUR":3 }
how shell I map this field?