deletectx - Deletes an entry in a context.
deletectx (variable, key…); deletectx (ctx:variable, key:key);
This function is used to delete an entry in a context based on a key.
Note: In the followings examples, the _ between the { should be removed to make it work.
res={_{ a = {x:1,y:2,z:3,w:[4,5]}; deletectx(a,'w'); a; }}. return res={"x":1,"y":2,"z":3}. res={_{ a = {x:1,y:2,z:3,w:[4,5]}; a.u; }}. return res=undefined. res={_{ a = {x:1,y:2,z:3,w:[4,5]}; deletectx(a,'w', 'x'); a; }}. return res={"y":2,"z":3}. res={_{ a = {x:1,y:2,z:3,w:[4,5]}; deletectx(ctx:a,'w', key:'x'); a; }}. return res={"y":2,"z":3}. res={_{ a = 1; deletectx(ctx:a,'w', key:'x'); a; }}. return .*is not a context.*
Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
1.0 2014-09-09 21:24:14 laplante@sednove.com