Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

Filter by int doesn't work #12

Closed
igorsantos07 opened this issue Sep 2, 2016 · 1 comment
Closed

Filter by int doesn't work #12

igorsantos07 opened this issue Sep 2, 2016 · 1 comment

Comments

@igorsantos07
Copy link

I'm not exactly sure if this is a bug or one of the shortcomings of the filter syntax described on the readme. Would be great if this worked, but if it's not possible, document the issue so others do not stumble upon :)

I'm trying to filter entries by a single integer value, but that triggers a "malformed filter query" error.
This is the filter I'm using: $.results[?(@.id = 1)]. To have it working, I simply had to quote the ID, like $.eligible_billables[?(@.id = "1")].

@stephenfrank
Copy link
Contributor

Hi Igor,

Yep, that was definitely a bug... unintentionally the regular expression was only working with 2 or more characters!

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

No branches or pull requests

2 participants