You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shame on me. This should be put in the doc. It can be found from the jsonql_test.go. jsonql depends on https://github.com/elgs/gojq. So you might find gojq examples helpful.
Thanks for the fast response and that worked. Do you know if there is a wildcard method to searching?
Example:
fmt.Println(parser.Query("name='sam' && skills.[*]='Eating'"))
I'm sorry I didn't implement the wildcard. You may need to check the skills array in your code. Your question is a good point. I should have done it that way.
Hi,
Using your example on the readme, how would you go about querying one of the nested values such as one of the skills?
Does this look right?
fmt.Println(parser.Query("name='elgs' && skills[]=Java"))
{
"name": "elgs",
"gender": "m",
"age": 35,
"skills": [
"Golang",
"Java",
"C"
]
},
{
"name": "enny",
"gender": "f",
"age": 36,
"hobby": null,
"skills": [
"IC",
"Electric design",
"Verification"
]
},
{
"name": "sam",
"gender": "m",
"age": 1,
"hobby": "dancing",
"skills": [
"Eating",
"Sleeping",
"Crawling"
]
}
The text was updated successfully, but these errors were encountered: