I got this ruby map
top_services = [["mfemve", "12,22"], ["vmtoolsd", "5,39"], ["zabbix_agentd", "1,89"]]
I need to convert this map to a JSON object and add keys something like this
{
{ "service_name" : "mfemve", "value" : "12,22" },
{ "service_name" : "vmtoolsd", "value" : "5,39" },
{ "service_name" : "zabbix_agentd", "value" : "1,89" }
}
how can I do this? thanks!