[erlang-questions] untyped records

Tim erlang@REDACTED
Tue Jul 2 22:41:13 CEST 2013


On 03/07/2013, at 5:31 AM, Karolis Petrauskas <k.petrauskas@REDACTED> wrote:

>     Its a proplist wrapped to a {struct, _}. You can access its
> fields as follows:
> {struct, X} = {struct,[
>         {code,1372793577767},
>         {desc,"e7iOSxy6PYQiMRk87r5cHK4DVAUj5SzI"},
>         {units,"g|Kg"}
> ]}.
> proplists:get_value(desc, X).

Thanks!



More information about the erlang-questions mailing list