title: selecting random json element
body: <p><strong>python 3.5</strong></p>
  
  <p>hi i have following json file and i want to select json data random...</p>
  
  <p><strong>json</strong></p>
  
  <pre><code>{"x":[
      {"A":"B"},
      {"A":"C"},
      {"F":"H"}
  ]}
  </code></pre>
  
  <p>select data where item in data['x'] is A </p>
  
  <p>(result would be C or B)</p>
  
  <p><strong>code</strong></p>
  
  <pre><code>data = json.load(open('j.json'))
  x = ""
  for item in data["x"]:
      T = True if "A" in item else False
      if T is True:
          x = item["A"]
          #break
      else:
          pass
  if x == "":
      print("nothing found")
  else :
      print(x)
  </code></pre>
  
  <p>when i break it , it just prints B every time i run script
  i want it to select B or C random 
  any ideas?!</p>