Javascript How to search in array by field
<p>I have a variable which holds this data:</p>

<pre><code>{"main":[
  {"id":"123","name":"name 1"},
  {"id":"234","name":"name 2"}

  ]
}
</code></pre>

<p>I know the id of the data I want to search.</p>

<p>My question is...How do I search for the name of id 234 (for example) is thw data above?</p>