jmespath-community / jmespath.spec

JMESPath Specification
6 stars 3 forks source link

Fix examples in wiki #170

Closed kit494way closed 1 year ago

kit494way commented 1 year ago

Numbers are incorrectly wrapped with [].

diff --git a/Examples.md b/Examples.md
index 423ff84..ce19262 100644
--- a/Examples.md
+++ b/Examples.md
@@ -8,7 +8,7 @@ value is greater than 20, we're creating a sub list of the name and age
 values.

 ```jmespath
-people[?age > [20]].[name, age]
+people[?age > `20`].[name, age]
 {
   "people": [
     {
@@ -39,7 +39,7 @@ greater than `20`. If instead we want to create the same hash structure
 but only include the `age` and `name` key, we can instead say:

 ```jmespath
-people[?age > [20]].{name: name, age: age}
+people[?age > `20`].{name: name, age: age}
 {
   "people": [
     {
springcomp commented 1 year ago

Thanks a lot for the feedback.

I see you generated some diffs. Would you be so kind as to submit a pull request?

kit494way commented 1 year ago

This is a diff from GitHub wiki. https://github.com/jmespath-community/jmespath.spec/wiki/examples

As far as I know, we cannot create pull requests for GitHub wiki. Should I attach the diff as a file?

springcomp commented 1 year ago

Good catch. Please, do not bother, I will update the examples.

springcomp commented 1 year ago

Fixed 👍