(t *testing.T)
| 1898 | } |
| 1899 | |
| 1900 | func TestIssue141(t *testing.T) { |
| 1901 | json := `{"data": [{"q": 11, "w": 12}, {"q": 21, "w": 22}, {"q": 31, "w": 32} ], "sql": "some stuff here"}` |
| 1902 | assert(t, Get(json, "data.#").Int() == 3) |
| 1903 | assert(t, Get(json, "data.#.{q}|@ugly").Raw == `[{"q":11},{"q":21},{"q":31}]`) |
| 1904 | assert(t, Get(json, "data.#.q|@ugly").Raw == `[11,21,31]`) |
| 1905 | } |
| 1906 | |
| 1907 | func TestChainedModifierStringArgs(t *testing.T) { |
| 1908 | // issue #143 |