0

I want to read specific Value from a csv file and take that value to process it further. I need to find the value based on it's header name and another value in the same row.

Example: Let's say I have a CSV file with below data

enter image description here

I need to find JSON Response Header value while my function will take Scenario name like GetUsers or GetSingleUser from function call.

I tried to use OpenCSV to read values from CSV and able to get data of JSON response while giving the index. But it's returning all the values of JSON Response column. How do I put a condition like match with Scenario name and give that corresponding JSON Response.

ex-ninja
  • 59
  • 2
  • It sounds like you are trying to get the same leverage you would get from keyed access in a relational database. – Walter Mitty Feb 24 '21 at 11:34
  • Not clear to me what you want to extract from the _JSON Response_. I understand that you **do not** want the entire JSON response. Is that correct? – Abra Feb 24 '21 at 12:02
  • No I want the complete JSON response and I need to process it further like save it as String and pass it to a different java function – ex-ninja Feb 24 '21 at 12:07
  • Yes Walter like we do in SQL query find JSON Response where Scenario name is GetUsers – ex-ninja Feb 24 '21 at 12:08

0 Answers0