jsonpath fails when using multiple []

Because the regexp matching the [] expression of a jsonpath is greedy ( .* ) it prevents using multiple [] in a jsonpath. For instance

foo[?name=bar].a[0].b

will fail because \\[(.*)\\] matches [?name=bar].a[0] instead of [?name=bar]. The proposed solution is to use .*? instead.

A workaround for the above is to use the alternate expression

foo[?name=bar].a.0.b

which is the same as the above without using the [] expression.

Signed-off-by: Loic Dachary <loic@dachary.org>