title: erlang convert complex binary structure to JSON
body: <p>I have a binary &lt;&lt;"{\"resp_child\":\"0\"}\n">> (as you can see it includes JSON) and I would like to extract this 0 as binary &lt;&lt;0>> from this binary.</p>
  
  <p>I am new to erlang, i was trying </p>
  
  <pre><code>string:join(binary_to_list(&lt;&lt;"{\"resp_child\":\"0\"}\n"&gt;&gt;), "")
  </code></pre>
  
  <p>but i get the JSON string as a result.</p>
  
  <pre><code>"{\"resp_child\":\"0\"}\n"
  </code></pre>
  
  <p>Don't know what to do further to get &lt;&lt;0>>.</p>
  
  <p>Thank you.</p>