<p>That's not a map. It's a tuple of one element, which is a list of two-tuples ({key, value}). Such a list is often called a proplist.</p>
<p>You could get your results like this:<br>
{Tx} = jiffy:decode...<br>
proplists:get_value(<<"foo">>, Tx)</p>
<p>Hth,<br>
Robby</p>
<div class="gmail_quote">On Jul 25, 2015 2:02 PM, "avinash D'silva" <<a href="mailto:evnix.com@gmail.com">evnix.com@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I have the following code.
<div><div> Tx=jiffy:decode(<<"{\"foo\": \"bar\",\"key\": \"val\"}">>).</div><div><br></div><div>where Tx is:</div><div>{[{<<"foo">>,<<"bar">>},{<<"key">>,<<"val">>}]}</div></div><div><br></div><div>I tried the following:</div><div><br></div><div><div>maps:get("foo",Tx).   </div><div>** exception error: {badmap,{[{<<"foo">>,<<"bar">>},{<<"key">>,<<"val">>}]}}</div><div>     in function  maps:get/2</div><div>        called as maps:get("foo",</div><div>                           {[{<<"foo">>,<<"bar">>},{<<"key">>,<<"val">>}]})</div></div><div><br></div><div>Any Idea on what I am doing wrong? any possible solutions?</div><div>I Couldn't find any documentation to access this type of map.</div><div><br></div></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div>