-
Notifications
You must be signed in to change notification settings - Fork 4
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
name filter is not exact #128
Comments
Actually, notice that the Moid in the second query is not in the results of the first query. What is going on here is that both queries are finding the same single SPT, the difference is what the JSONPath extracts from the results because of a subtle difference between When you use
Whereas if you use
The next subtle thing is the way JSONPath works - if you take a look at the JSONPath spec you will see that it uses Going back to the ntp policy example above:
Notice that they return different Moids. This is because the first one is actually returning All of this is to say that when using
I fully appreciate this is quite subtle and a bit confusing - I would definitely welcome any suggestions to simplify this. One option is just to offer something better than JSONPath which is pretty easy to get wrong when you just want to pull out a specific attribute - maybe just use Go templates instead (see #100). |
Thanks for the explanation Chris. Much appreciated, now I understand what is happening |
I have 2 SPT's:
OCP-BM
OCP-BM-M6
When I search for OCP-BM the name filter returns 2 SPTs
this is a valid workaround
The text was updated successfully, but these errors were encountered: