; JsonArrayRemove Example ; ----------------------- ; Requires Extended mode. q$=Chr(34) ; Double-quote character, for building JSON text ; The hero's inventory - the potion sits in slot 2 inventory=ParseJson("["+q+"sword"+q+","+q+"shield"+q+","+q+"potion"+q+"]") Print "Before drinking: "+JsonStringify(inventory,0) Print "Item count: "+JsonCount(inventory) Print "" ; The hero drinks the potion - JsonArrayRemove deletes slot 2 ; and returns true on success ok=JsonArrayRemove(inventory,2) Print "JsonArrayRemove(inventory,2) returned "+ok Print "After drinking: "+JsonStringify(inventory,0) Print "Item count: "+JsonCount(inventory) FreeJson inventory Print "" Print "Press any key to close the example" WaitKey End