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

Remove empty keys #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Cyclonecode
Copy link

@Cyclonecode Cyclonecode commented Jul 12, 2019

I was using this package for to handle oauth and making rest api requests to magento. In the filters to the endpoint I had a trailing & which made the request fail, so thought it would be a good idea to actually remove all empty parameters e.g

    const searchCriteria =
      'searchCriteria[filter_groups][0][filters][0][field]=entity_id&' +
      'searchCriteria[filter_groups][0][filters][0][value]=' + id + '&' +
      'searchCriteria[filter_groups][1][filters][0][field]=status&' +
      'searchCriteria[filter_groups][1][filters][0][value]=1&';

Here I really would like to remove the trailing &.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant