Best approach to obtain data from this type of Map
Hello,
I have the following code snippet and I wanted to ask fellow dev on what is the best approach to obtain data from this map. What I'm really interested in is getting the Company string data from this map. Below I use a combination of prefix/suffix functions to get the desired data but is there a way to get the same data using map.get?
MacLookupMap = { "responseCode" : "100", "responseText" : "[{\"company\":\"Lenovo Mobile Communication Technology Ltd.\",\"addressL1\":\"No.999, Qishan North 2nd Road\",\"addressL2\":\"Information & Optoelectronics Park, Torch Hi-tech Industry Development Zone,\",\"addressL3\":\"Xiamen Fujian 361006\",\"country\":\"CHINA\"}]" };
TempString = MacLookupMap.get("responseText");
TempString = TempString.getSuffix("company");
CompanyString = getAlphaNumeric(TempString.getPrefix("addressL1")).toUpperCase();
Appreciate your input.
Cheers!