$LIST
References:
A $LIST is basically JSON, but extended to include all the various grapa data types.
Action | Example | Result |
---|---|---|
Create | {a:1, b:2, c:3} | {"a":1,"b":2,"c":3} |
Access | {a:1, b:2, c:3}.a{a:1, b:2, c:3}[1]{a:1, b:2, c:3}[-1] | 113 |
Append | x = {a:1, b:2};x += (c:3);x; | {"a":1, "b":2, "c":3} |
Append | x = {a:1, b:2};x ++= {c:3,d:4};x; | {"a":1, "b":2, "c":3, "d":4} |
Insert | x = {a:1, b:2};x += (c:3) x[0];x; | {"c":3,"a":1,"b":2} |
Count | {a:1, b:2, c:3}.len() | 3 |
Remove | x = {a:1, b:2, c:3};x -= x[1];x; | {"a":1, "c":3} |