I have a tuple generated using jiffy library.
For example : jiffy:decode(<<"{\"foo\":\"bar\"}">>). results in
{[{<<"foo">>,<<"bar">>}]}
I want <<"foo">> to be "foo"
Is there a way for converting the <<"foo">> to "foo"?
Basically I want to convert this:
[{<<"t">>,<<"getWebPagePreview">>},{<<"message">>,<<"google.com">>}]
into this:
[{"t",<<"getWebPagePreview">>},{"message",<<"google.com">>}]
note: consider this to be a very large list, and I want an efficient solution.
there is a function to transform a binary
<<"hello">>into a list"hello":You can apply this to your list using a list comprehension:
you can embed this in a function: