title: How to get all parent and child id, name values from sample json dictionary based on the type?
body: <p>How to retrieve id, name values where type=type1 in Robot Framework/Python. Try to use the code provided in <a href="https://stackoverflow.com/questions/41978952/how-to-use-fully-functional-jsonpath-in-robotframework">How to use fully functional JsonPath in RobotFramework?</a>, but the sample JSON I have is different and the solution doesn't seem to work the way I wanted.</p>
  
  <p>a) Get all id, name values where type=type1
     expected result : </p>
  
  <pre><code> { {'538','Test Org1'},{'236','Test Org2'}}
  </code></pre>
  
  <p>b) Get all id, name values where division.type = DivType1 for Parent Id =236<br>
  expected result:  </p>
  
  <pre><code>{{'905',‘Test Org2 Div1’},{ '906’, ‘Test Org2 Div2’}}
  </code></pre>
  
  <p>c) Get all division  Id, name where location = Chicago under Parent Id=538 </p>
  
  <p>Sample Webservice Response ( used Requests Library Get Request and got below response into a variable).</p>
  
  <pre><code>[
  {'id': '538', 'name': ‘Test Org1’, 'type': ‘type1’,
  ‘relationships': 
  [{‘division’: {'id': '905', 'name': ‘Test Org Div1’, 'type': 
  ‘DivType1’}, ‘location’: ‘Chicago’}, {‘division’: {'id': '905', 
  'name': ‘Test Org Div1’, 'type': ‘DivType2’}, ‘location’: 
  ‘NewYork’}]}, 
  {'id': ’236’, 'name': ‘Test Org2’, 'type': ‘type1’, 
  ‘relationships': 
  [{‘division’: {'id': '905', 'name': ‘Test Org2 Div1’, 'type': 
  ‘DivType1’}, ‘location’: ‘Atlanta’}, {‘division’: {'id': '906’, 
  'name': ‘Test Org2 Div2’, 'type': ‘DivType1’}, ‘location’: 
   ‘NewYork’}]}
   ]
  </code></pre>
  
  <p>Trying to Pass the JSON object and get the list of values passing json path.</p>
  
  <pre><code>${RespJson}=         set variable       ${resp.json()}
  ${RStr}=       Convert JSON to String   ${RespJson[0]}
  ${ParentId}=    Get Items By Path  ${RStr}  $.(@.type=="type1")].id
  log to console       ${ParentId}
  </code></pre>