How can I get a certain value out of JSON if I know one specific value. If I want to extract car type and I know the car name. I have try different variations of this: ${GetType}= Get Value From Json ${CarList.json()} $…type[?($.name=Focus)]
Hi I had the same issue (I needed an ID of a form and knew only name of the form) and I solved it using JSONLibrary. I stored the JSON response into a variable which I converted into a dictionary and then used “get value from json” as you did.
I also noticed that you dont use quotation marks for the value of a key name=‘Focus’
Exmaple of my JSON:
${responseGET}= GET https://xxxxx.com/api/form headers=${header}
${json} Set Variable ${responseGET.json()}
Convert to Dictionary ${json}
${id} Get value from json ${json} $..data[?(@.name=='${formName}')].id