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
@liuhongda11
For the first example, jsonpath.Get("$.welcome.123456[1]", v), I would propose you use bracket-notation in your path, such as:
jsonpath.Get(`$.welcome["123456"][1]`, v)
I haven't attempted with a hyphen in the index, but I'm guessing that can be solved using bracket-notation as well. Note that I use double-quotes (") in the path above. When using single quotes (') it seems like the number is treated as a character and thus won't work for numbers with more than one digit.
`v := interface{}(nil)
The text was updated successfully, but these errors were encountered: