Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple functions for JSON response captures #86

Open
alexandrehtrb opened this issue Mar 22, 2024 · 2 comments
Open

Simple functions for JSON response captures #86

alexandrehtrb opened this issue Mar 22, 2024 · 2 comments
Labels
good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed

Comments

@alexandrehtrb
Copy link
Owner

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

@cameronpyne-smith
Copy link
Contributor

Hi @alexandrehtrb
I really like what you have created here and I would be happy to work on this issue.
I've submitted this PR for the first function to get some early feedback and to make sure I am on the right path and I will continue with the rest if you are happy with that.
#87

@alexandrehtrb
Copy link
Owner Author

Hello @cameronpyne-smith ,
Welcome and thanks for your contribution!
You are on the right path, keep going!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants