jmespath.js
                                
                                 jmespath.js copied to clipboard
                                
                                    jmespath.js copied to clipboard
                            
                            
                            
                        Recursive traversal missing
First of all thank you very much for this great library which helped us with our project a lot!!!
Only feature that we really miss is that JMESPath doesn't have recursive traversal. Like the standard feature // in XPath or  .. in JsonPath.
Thank you very much for your response
Can you give a use case? or example of what you're trying to achieve?
@kvetoslavnovak I believe the let() function coming to JMESPath Community sort of does what you want.
Can you give a use case? or example of what you're trying to achieve?
E.g. I am trying to get all TYPE_OF_DATE tags/nodes which are all over the different places in my XMLs. Using JSONPath library for the time being. Example of my code:
  // using JSONPath to get all TYPE_OF_DATE  because JMESPath cannot do recursive traversal (to get non-rooted expressions)
   let TYPE_OF_DATE = JSONPath({
     path: "$..TYPE_OF_DATE",
     json: JSONfile,
   });
Description of // XPath selector is for example here W3School - XPath Syntax 
@kvetoslavnovak I believe the
let()function coming to JMESPath Community sort of does what you want.
Thank you very much for this tip.
@springcomp  thank you for the let()tip. But it does not seem to be exactly the right tool nor as easy to use as the others // or .. recursive traversal child selectors usually are.
@kvetoslavnovak I‘ve setup #148 to track this feature.
@springcomp thank you very much
@kvetoslavnovak We want to propose this feature to JMESPath and will include this in the next iteration for JMESPath Community.