0

I am not able to get a list of id from the below json with the help of RestAssured JsonPath.

{
    "Test": [
        {
            "id": "657"
        },
        {
            "id": "2711"
        }
    ],
    "Test2": [
        {
            "id": "657"
        },
        {
            "id": "711"
        }
    ]
}
Aakash Pahuja
  • 469
  • 4
  • 10
  • The JSON is invalid. Property names (`"id"`) in JavaScript objects `{}`have to be unique. Entor your JSON on https://jsonlint.com/. It will show the error _SyntaxError: Duplicate key 'id' on line 4_. This would be valid: ```{ "Test": [{ "id": "21657" }, { "id": "21658" } ], "Test2": [{ "id": "216571" }, { "id": "216581" } ] }``` – andy Apr 26 '18 at 10:40
  • OK, still not able? You should provide more information. What are you trying to do? What is you JsonPath query? Do you get an error message? – andy Apr 26 '18 at 12:10
  • what do you mean that you are unable to? a simple `$..id` gives me the list of id's. – Payam May 01 '18 at 01:26

0 Answers0