Skip to content

Simple functions for JSON response captures #86

Open
@alexandrehtrb

Description

We can add some functions for JSON response captures, like:

  • $.somearray.count() --> counts the number of elements in an array
  • $.somearray.first() --> gets the first element of an array
  • $.somearray.last() --> gets the last element of an array
  • $.somearray.firstWhere(prop == "abc") --> gets the first object whose property prop equals to "abc"
[
  {
    "id": 1,
    "name": "ghi"
  },
  {
    "id": 2,
    "name": "abc" // this one
  }
  {
    "id": 3,
    "name": "def"
  }
]

File to be changed: PororocaResponseValueCapturer.cs + unit tests

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions