We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Given the following JSON:
{"values":[["test"]]}
Attempting to get the value of "test" via the values[0][0] path fails.
"test"
values[0][0]
Example program:
package main import ( "fmt" "github.com/stretchr/objx" ) func main() { d := objx.MustFromJSON(`{"values":[["test"]]}`) // Returns "[]interface {}{"test"}". fmt.Println(d.Get("values[0]").String()) // Returns empty string. fmt.Println(d.Get("values[0][0]").String()) }
The expected result would be for d.Get("values[0][0]").String() to return test.
d.Get("values[0][0]").String()
test
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Given the following JSON:
Attempting to get the value of
"test"
via thevalues[0][0]
path fails.Example program:
The expected result would be for
d.Get("values[0][0]").String()
to returntest
.The text was updated successfully, but these errors were encountered: