How to check particular json array parameter values from jsonarray

تعرفه تبلیغات در سایت

آرشیو مطالب

امکانات وب

Vote count: 0

I am suing restassured for automating my apis, here is my jsonResponse:-

{
    "al": [{
            "aid": 1464,
            "_r": "Bus Stand,",
            "_l": "spaze it park2,",
            "_c": ",",
            "_s": "Haryana,",
            "co": "India,",
            "pc": "122001",
            "fa": "Sona Road, spaze it park, Gurgaon, Haryana,",
            "fn": "225,",
            "lm": "omax mall",
            "pa": null,
            "at": 1
        },
        {
            "aid": 1462,
            "_r": "Bus Stand,",
            "_l": "spaze it park2,",
            "_c": "Gurgaon,",
            "_s": "Haryana,",
            "co": "India,",
            "pc": "122001",
            "fa": "Sona Road, spaze it park, Gurgaon, Haryana,",
            "fn": "225,",
            "lm": "omax mall",
            "pa": null,
            "at": 1
        },
        {
            "aid": 1461,
            "_r": null,
            "_l": null,
            "_c": "Gurgaon1",
            "_s": "",
            "co": null,
            "pc": "122003",
            "fa": "Gurgaon, HRyana, 122003",
            "fn": "",
            "lm": "",
            "pa": null,
            "at": -1
        },
        {
            "aid": 1460,
            "_r": "Bus Stand,",
            "_l": "spaze it park2,",
            "_c": "Gurgaon,",
            "_s": "Haryana,",
            "co": "India,",
            "pc": "122001",
            "fa": "Sona Road, spaze it park, Gurgaon, Haryana,",
            "fn": "225,",
            "lm": "omax mall",
            "pa": null,
            "at": 2
        }
    ]
}

Now i want to put assertions for jasonarray having "aid": 1460, like what's the value of lm,at etc parameters. How we can do the same in restassured. Also want to know the index position of jsonarray having "aid": 1460. Please help me!!

asked 30 secs ago
Suresh Sharma

نویسنده : استخدام کار بازدید : 0 تاريخ : سه شنبه 29 اسفند 1396 ساعت: 14:30
برچسب‌ها :

خبرنامه

عضویت

نام کاربري :
رمز عبور :