question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot use .length() after filter expression

See original GitHub issue

Hello, maybe I am just writing wrong expression, but when using this json: { ... "tasks": [ { ... "runners": ["one"] } ] } and this expression: $.tasks[*].runners[?(@ empty false)].length()

it evaluates to array with null (which is I suppose the count of fields the “one” has) Is this a bug, or should I use some different expression? Thank you.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
MukhtarKazcommented, Jan 6, 2021

Can you try size() instead of length()?

2reactions
fslevcommented, Jan 23, 2022

Jaon-path design flaw

Read more comments on GitHub >

github_iconTop Results From Across the Web

JsonPath get length of array after filter - Stack Overflow
Hi I want get legth of array after Filter with JsonPath. ... path expressions matching the input path expression, which can be used...
Read more >
How to use Stream.filter method in Java 8? Example Tutorial
The first example just uses one filter() method to print Strings whose length is greater than 10. The second example prints String which...
Read more >
6.4. Building Display Filter Expressions - Wireshark
You can build display filters that compare values using a number of different comparison operators. For example, to only display packets to or...
Read more >
Scan - Amazon DynamoDB - AWS Documentation
To have DynamoDB return fewer items, you can provide a FilterExpression operation. ... with a reserved word, so it cannot be used directly...
Read more >
Excel FILTER function with formula examples - Ablebits
Size bands can also vary based upon dates. Levels & zones are constant. Fees to be calculated based on ordered date. Cannot use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found