Challenge 4 rest-assured

Làm thế nào để có thể extract data theo điều kiện?

Lấy name theo điều kiện là type="Chocolate"

[
  {
    "id": "0001",
    "type": "donut",
    "name": "Choco Blueberry Cake", // Đây là thông tin cần lấy
    "ppu": 0.55,
    "batter": [
      {
        "id": "1001",
        "type": "Regular"
      },
      {
        "id": "1002",
        "type": "Chocolate" // Đây là điều kiện
      },
      {
        "id": "1003",
        "type": "Blueberry"
      }
    ]
  },
  {
    "id": "0002",
    "type": "donut",
    "name": "Choco Blueberry Cake",
    "ppu": 0.55,
    "batter": [
      {
        "id": "1001",
        "type": "Regular"
      },
      {
        "id": "1002",
        "type": "Chocolate 2"
      },
      {
        "id": "1003",
        "type": "Blueberry"
      }
    ]
  }
]

Bạn có thể thử link này: Challenge 4 rest-assured

Bạn hãy comment câu trả lời của bạn và so sánh với solution ở page 2.

0 0 votes
Đánh giá challenge
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments