0

I am new to regular expression and not able to find the solution of my problem. I have one JSON which my service is returning in response

"{\"Version\":14,\"Collections\":[{\"Id\":\"**************\",{\"Id\":\"**************\"\ "Solutions\":[{\"Id\":\"**************\"",{\"Id\":\"**************\" 

which consists of multiple collections and multiple solutions having multiple ids in both and I want to extract the all id's related to collections only not solution id and when want to extract the solutions id's only not collection id's.

I am using ----- "Id.":."(.+?).",."--- but it is giving both id's i.e. collections and solutions.

1
  • 3
    Don't use regular expressions to parse JSON. JSON is not regular Commented Sep 22, 2021 at 14:30

1 Answer 1

1

Please post the full response data as partial one doesn't tell the full story.

JSON is not a regular language therefore trying to parse it using regular expressions is not the best idea, JMeter provides JSON Extractor and JSON JMESPath Extractor which are way more handy and powerful.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.