Skip to content

Instantly share code, notes, and snippets.

@joeywhelan
Created April 23, 2023 18:15
JSON.SET ex2:5 $ '{"str1": "val1", "str2": "val2", "arr1":[1,2,3,4], "obj1": {"num1": 1,"arr2":["val1","val2", "val3"]}}'
JSON.GET ex2:5 $.obj1.arr2
JSON.GET ex2:5 $.arr1[1]
JSON.GET ex2:5 $.obj1.arr2[0:2]
JSON.GET ex2:5 $.arr1[-2:]
"[[\"val1\",\"val2\",\"val3\"]]"
"[2]"
"[\"val1\",\"val2\"]"
"[3,4]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment