title: JSON loop through key value pairs to set another key value
body: <p>I'm very new to scripting and JSON and I'm trying to loop through some key pairs in an object (shown below) to accomplish, &quot;if the value in 3[x].4 = 'BBB', then return the value in 3[x].1&quot;</p>
  <p>Happy to elaborate on this as I know this may not be clear. Thank you in advance for any help!</p>
  <pre><code>var pID = {
  '3[1].1': '111111',
  '3[1].4': 'PPP',
  '3[1].5': 'PPP',
  '3[2].1': '222222',
  '3[2].4': 'MMM',
  '3[2].5': 'MMM',
  '3[3].1': '333333',
  '3[3].4': 'BBB',
  '3[3].5': 'BBB',
  '3[4].1': '444444',
  '3[4].4': 'XXX',
  '3[4].5': 'XXX'}
  </code></pre>