I am having problems parsing through a JSON response. It basically returns a JSON array of objects such as
[
{"id":"123","value":"abc","description":"something"},
{"id":"456","value":null,"description":"something else"},
{"id":"789","value":"def","description":"something more"}
]
When I use the following regex expression
"id":"(.+?)","value":(?!null),"description":"(.+?)"
in the Regular Expression Extractor I get the following result:
variable[0][1]:123, variable[0][2]:something
variable[1][1]:456, variable[1][2]:something more
which is wrong since the match must have be broken in the second object and not picked up the second id and use the third object’s description. I am expecting the id to be 789 not 456.
I found my own answer. I needed to break the match if there was a } bracket in between the words such as
easy fix 🙂