{"id":183,"date":"2024-09-30T10:40:41","date_gmt":"2024-09-30T09:40:41","guid":{"rendered":"http:\/\/monkey.ploogie.co.uk\/?page_id=183"},"modified":"2024-09-30T10:40:41","modified_gmt":"2024-09-30T09:40:41","slug":"mwnci-delete-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-delete-function\/","title":{"rendered":"Mwnci delete() Function"},"content":{"rendered":"<h2><span id=\"Syntax\" class=\"mw-headline\">Syntax<\/span><\/h2>\n<p>delete(<i><b>hash<\/b><\/i>, <i><b>key<\/b><\/i>)<\/p>\n<p>delete(<i><b>array<\/b><\/i>, <i><b>index<\/b><\/i>)<\/p>\n<h2><span id=\"Description\" class=\"mw-headline\">Description<\/span><\/h2>\n<p><i>delete()<\/i> will remove the designated key and it\u2019s content from the named hash, the designated index and value from the named array<\/p>\n<h2><span id=\"Example\" class=\"mw-headline\">Example<\/span><\/h2>\n<pre>my_hash={\"Name\": \"Eccles\", \"DOB\": \"01\/02\/01\"}\r\nprintln(my_hash)\r\nmy_hash=delete(my_hash, \"DOB\")\r\nprintln(my_hash)\r\n\r\nmy_array=[1,\"two\",3]\r\nprintln(my_array)\r\nmy_array=delete(my_array, 1)\r\nprintln(my_array)\r\n\r\n{Name: Eccles, DOB: 01\/02\/01}\r\n{Name: Eccles}\r\n[1, two, 3]\r\n[1,3]\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax delete(hash, key) delete(array, index) Description delete() will remove the designated key and it\u2019s content from the named hash, the designated index and value from the named array Example my_hash={&#8220;Name&#8221;: &#8220;Eccles&#8221;, &#8220;DOB&#8221;: &#8220;01\/02\/01&#8221;} println(my_hash) my_hash=delete(my_hash, &#8220;DOB&#8221;) println(my_hash) my_array=[1,&#8221;two&#8221;,3] println(my_array) my_array=delete(my_array, 1) println(my_array) {Name: Eccles, DOB: 01\/02\/01} {Name: Eccles} [1, two, 3] [1,3]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-183","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/183","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=183"}],"version-history":[{"count":1,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/183\/revisions"}],"predecessor-version":[{"id":184,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/183\/revisions\/184"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}