When you use JSON.deserializeUntyped(data)
, you need to perform type casting to tell the Apex compiler what kind of object you're working with or you'll get errors because the type Object
has no property baseVolume
(e.g.).
One way to accomplish this would be:
for (Object obj : meta.keyset()){
Data d = (Data)meta.get(obj);
System.debug(d.baseVolume);
}