{"id":2381,"date":"2017-03-27T17:54:16","date_gmt":"2017-03-27T12:24:16","guid":{"rendered":"https:\/\/www.wikitechy.com\/technology\/?p=2381"},"modified":"2017-03-28T15:09:20","modified_gmt":"2017-03-28T09:39:20","slug":"pass-command-line-arguments","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/technology\/pass-command-line-arguments\/","title":{"rendered":"[ Solved &#8211; 10 Answers ] JAVASCRIPT &#8211; How to pass command line arguments"},"content":{"rendered":"<p><label class=\"label label-Warning\">PROBLEM<\/label><\/p>\n<ul>\n<li>We have a web server written in Node.js that we would like to launch with a specific folder. Does not sure how to access arguments in JavaScript.<\/li>\n<\/ul>\n<h4 id=\"here-running-node-like-this\"><span style=\"color: #800000;\">Here running node like this:<\/span><\/h4>\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;%24%20node%20server.js%20folder%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n[ad type=&#8221;banner&#8221;]\n<p>Where server.js is the code.<\/p>\n<p>$ node -h<br \/>\n<span style=\"color: #000000;\">Usage:<\/span> node [options] script.js [arguments]\n<p>How to access those arguments in JavaScript?<\/p>\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;Javjavascript%20%20%20%20%20%20%20%20%20%20%20node.js%20%20%20%20%20%20%20%20arguments%20%20%20%20%20%20%20%20%20%20%20%20%20%20command-line-argumentsascript%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n<p><label class=\"label label-info\">SOLUTION 1:<\/label><\/p>\n<p>The arguments are stored in process.argv<\/p>\n<p>process.argv is an array containing the command line arguments. The first element will be &#8216;node&#8217;, the second element will be the name of the JavaScript file. The next elements will be any additional command line arguments.<\/p>\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;%2F%2F%20print%20process.argv%0Aprocess.argv.forEach(function%20(val%2C%20index%2C%20array)%20%7B%0A%20%20console.log(index%20%2B%20&#8217;%3A%20&#8217;%20%2B%20val)%3B%0A%7D)%3B%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n<h4 id=\"this-will-generate\"><span style=\"color: #800080;\">This will generate:<\/span><\/h4>\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;%24%20node%20process-2.js%20one%20two%3Dthree%20four%0A0%3A%20node%0A1%3A%20%2FUsers%2Fmjr%2Fwork%2Fnode%2Fprocess-2.js%0A2%3A%20one%0A3%3A%20two%3Dthree%0A4%3A%20four%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n<p><label class=\"label label-info\">SOLUTION 2:<\/label><\/p>\n<ul>\n<li><span style=\"color: #000000;\">To normalize the arguments like a regular javascript function would receive, we do this in my node.js shell scripts:<\/span><\/li>\n<\/ul>\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;var%20args%20%3D%20process.argv.slice(2)%3B%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n<p><span style=\"color: #000000;\">Note : <\/span>The first arg is usually the path to nodejs, and the second arg is the location of the script you&#8217;re executing.<\/p>\n<p><label class=\"label label-info\">SOLUTION 3:<\/label><\/p>\n<ul>\n<li><span style=\"color: #000000;\">To use the\u00a0minimist\u00a0library. We can use node-optimist but it has since been deprecated.<\/span><\/li>\n<\/ul>\n<p><strong>Here is an example of how to use it taken straight from the minimist documentation:<\/strong><\/p>\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;var%20argv%20%3D%20require(&#8216;minimist&#8217;)(process.argv.slice(2))%3B%0Aconsole.dir(argv)%3B%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;%24%20node%20example%2Fparse.js%20-a%20beep%20-b%20boop%0A%7B%20_%3A%20%5B%5D%2C%20a%3A%20&#8217;beep&#8217;%2C%20b%3A%20&#8217;boop&#8217;%20%7D%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;%24%20node%20example%2Fparse.js%20-x%203%20-y%204%20-n5%20-abc%20&#8211;beep%3Dboop%20foo%20bar%20baz%0A%7B%20_%3A%20%5B%20&#8217;foo&#8217;%2C%20&#8217;bar&#8217;%2C%20&#8217;baz&#8217;%20%5D%2C%0A%20%20x%3A%203%2C%0A%20%20y%3A%204%2C%0A%20%20n%3A%205%2C%0A%20%20a%3A%20true%2C%0A%20%20b%3A%20true%2C%0A%20%20c%3A%20true%2C%0A%20%20beep%3A%20&#8217;boop&#8217;%20%7D%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n<p><label class=\"label label-info\">SOLUTION 4:<\/label><\/p>\n<ul>\n<li><span style=\"color: #000000;\">Vanilla javascript argument parsing:<\/span><\/li>\n<\/ul>\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;const%20args%20%3D%20process.argv%3B%0Aconsole.log(args)%3B%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n<h4 id=\"this-returns\"><span style=\"color: #000000;\">This returns:<\/span><\/h4>\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;%24%20node%20process-2.js%20one%20two%3Dthree%20four%0A%5B&#8217;node&#8217;%2C%20&#8217;%2FUsers%2Fdc%2Fnode%2Fserver.js&#8217;%2C%20&#8217;one&#8217;%2C%20&#8217;two%3Dthree&#8217;%2C%20&#8217;four&#8217;%5D%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n<p><label class=\"label label-info\">SOLUTION 5:<\/label><\/p>\n<ul>\n<li><span style=\"color: #000000;\">This is very similar to how bash scripts access argument values.<\/span><\/li>\n<\/ul>\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;%24%20node%20yourscript.js%20banana%20monkey%0A%0Avar%20program_name%20%3D%20process.argv%5B0%5D%3B%20%2F%2Fvalue%20will%20be%20%22node%22%0Avar%20script_path%20%3D%20process.argv%5B1%5D%3B%20%2F%2Fvalue%20will%20be%20%22yourscript.js%22%0Avar%20first_value%20%3D%20process.argv%5B2%5D%3B%20%2F%2Fvalue%20will%20be%20%22banana%22%0Avar%20second_value%20%3D%20process.argv%5B3%5D%3B%20%2F%2Fvalue%20will%20be%20%22monkey%22%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n<p><label class=\"label label-info\">SOLUTION 6:<\/label><\/p>\n<ul>\n<li><span style=\"color: #000000;\">Stdio Library<\/span><\/li>\n<li><span style=\"color: #000000;\">The easiest way to parse command-line arguments in NodeJS is using the stdio module.<\/span><\/li>\n<\/ul>\n<h4 id=\"inspired-by-unix-getopt-utility-it-is-as-trivial-as-follows\"><span style=\"color: #000000;\">Inspired by UNIX getopt utility, it is as trivial as follows:<\/span><\/h4>\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;var%20stdio%20%3D%20require(&#8216;stdio&#8217;)%3B%0Avar%20ops%20%3D%20stdio.getopt(%7B%0A%20%20%20%20&#8217;check&#8217;%3A%20%7Bkey%3A%20&#8217;c&#8217;%2C%20args%3A%202%2C%20description%3A%20&#8217;What%20this%20option%20means&#8217;%7D%2C%0A%20%20%20%20&#8217;map&#8217;%3A%20%7Bkey%3A%20&#8217;m&#8217;%2C%20description%3A%20&#8217;Another%20description&#8217;%7D%2C%0A%20%20%20%20&#8217;kaka&#8217;%3A%20%7Bargs%3A%201%2C%20mandatory%3A%20true%7D%2C%0A%20%20%20%20&#8217;ooo&#8217;%3A%20%7Bkey%3A%20&#8217;o&#8217;%7D%0A%7D)%3B%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n<p style=\"top: 130px;\">[ad type=&#8221;banner&#8221;]\n<h4 id=\"if-you-run-the-previous-code-with-this-command\"><span style=\"color: #000000;\">If you run the previous code with this command:<\/span><\/h4>\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;node%20%3Cyour_script.js%3E%20-c%2023%2045%20&#8211;map%20-k%2023%20file1%20file2%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n<h4 id=\"then-ops-object-will-be-as-follows\"><span style=\"color: #000000;\">Then ops object will be as follows:<\/span><\/h4>\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;%7B%20check%3A%20%5B%20&#8217;23&#8217;%2C%20&#8217;45&#8217;%20%5D%2C%0A%20%20args%3A%20%5B%20&#8217;file1&#8217;%2C%20&#8217;file2&#8217;%20%5D%2C%0A%20%20map%3A%20true%2C%0A%20%20kaka%3A%20&#8217;23&#8217;%20%7D%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n<h4 id=\"so-you-can-use-it-as-you-want-for-instance\"><span style=\"color: #000000;\">So you can use it as you want. For instance:<\/span><\/h4>\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;if%20(ops.kaka%20%26%26%20ops.check)%20%7B%0A%20%20%20%20console.log(ops.kaka%20%2B%20ops.check%5B0%5D)%3B%0A%7D%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n<p>Grouped options are also supported, so you can write -om instead of -o -m.<\/p>\n<p>Furthermore, stdio can generate a help\/usage output automatically.<\/p>\n<h4 id=\"if-we-call-ops-printhelp-we-will-get-the-following\"><span style=\"color: #000000;\">If we call ops.printHelp() we will get the following:<\/span><\/h4>\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;USAGE%3A%20node%20something.js%20%5B&#8211;check%20%3CARG1%3E%20%3CARG2%3E%5D%20%5B&#8211;kaka%5D%20%5B&#8211;ooo%5D%20%5B&#8211;map%5D%0A%20%20-c%2C%20&#8211;check%20%3CARG1%3E%20%3CARG2%3E%20%20%20What%20this%20option%20means%20(mandatory)%0A%20%20-k%2C%20&#8211;kaka%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20(mandatory)%0A%20%20&#8211;map%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Another%20description%0A%20%20-o%2C%20&#8211;ooo%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n<p style=\"top: 130px;\">[ad type=&#8221;banner&#8221;]\n<p>The previous message is shown also if a mandatory option is not given (preceded by the error message) or if it is mispecified (for instance, if you specify a single arg for an option and it needs 2).<\/p>\n<h4 id=\"you-can-install-stdio-module-using-npm\"><span style=\"color: #000000;\">You can install stdio module using NPM:<\/span><\/h4>\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;npm%20install%20stdio%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n<p><label class=\"label label-info\">SOLUTION 7:<\/label><\/p>\n<ul>\n<li>\n<h5 id=\"if-your-script-is-myscript-js-and-you-want-to-pass-the-first-and-last-name-wiki-techy-as-arguments-like-below\"><span style=\"color: #000000;\"><strong>If your script is myScript.js and you want to pass the first and last name, \u2018Wiki Techy&#8217;, as arguments like below:<\/strong><\/span><\/h5>\n<\/li>\n<\/ul>\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;node%20myScript.js%20Wiki%20Techy%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n<h4 id=\"then-your-script-is-written-as-follows\"><span style=\"color: #000000;\">Then your script is written as follows:<\/span><\/h4>\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;var%20firstName%20%3D%20process.argv%5B2%5D%3B%20%2F%2F%20Will%20be%20set%20to%20%E2%80%98Wiki&#8217;%0Avar%20lastName%20%3D%20process.argv%5B3%5D%3B%20%2F%2F%20Will%20be%20set%20to%20%E2%80%98Techy&#8217;%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n<p><label class=\"label label-info\">SOLUTION 8:<\/label><\/p>\n<ul>\n<li><strong><span style=\"color: #000000;\">Here is an another solution:<\/span><\/strong><\/li>\n<\/ul>\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;%23!%2Fusr%2Fbin%2Fenv%20node%0Avar%20argv%20%3D%20require(&#8216;yargs&#8217;).argv%3B%0Aconsole.log(&#8216;(%25d%2C%25d)&#8217;%2C%20argv.x%2C%20argv.y)%3B%0Aconsole.log(argv._)%3B%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n<p>Output is here (it reads options with dashes etc, short and long, numeric etc).<\/p>\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;%24%20.%2Fnonopt.js%20-x%206.82%20-y%203.35%20rum%0A(6.82%2C3.35)%0A%5B%20&#8217;rum&#8217;%20%5D%20%0A%24%20.%2Fnonopt.js%20%22me%20hearties%22%20-x%200.54%20yo%20-y%201.12%20ho%0A(0.54%2C1.12)%0A%5B%20&#8217;me%20hearties&#8217;%2C%20&#8217;yo&#8217;%2C%20&#8217;ho&#8217;%20%5D%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n<p><label class=\"label label-info\">SOLUTION 9:<\/label><\/p>\n<ul>\n<li>\n<h5 id=\"we-can-parse-all-arguments-and-check-if-they-exist\"><span style=\"color: #000000;\">we can parse all arguments and check if they exist.<\/span><\/h5>\n<\/li>\n<\/ul>\n<h4 id=\"file-parse-cli-arguments-js\"><span style=\"color: #000000;\">file: parse-cli-arguments.js:<\/span><\/h4>\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;module.exports%20%3D%20function(requiredArguments)%7B%0A%20%20%20%20var%20arguments%20%3D%20%7B%7D%3B%0A%0A%20%20%20%20for%20(var%20index%20%3D%200%3B%20index%20%3C%20process.argv.length%3B%20index%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20var%20re%20%3D%20new%20RegExp(&#8216;&#8211;(%5BA-Za-z0-9_%5D%2B)%3D(%5BA%2F-Za-z0-9_%5D%2B)&#8217;)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20matches%20%3D%20re.exec(process.argv%5Bindex%5D)%3B%0A%0A%20%20%20%20%20%20%20%20if(matches%20!%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20arguments%5Bmatches%5B1%5D%5D%20%3D%20matches%5B2%5D%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;for%20(var%20index%20%3D%200%3B%20index%20%3C%20requiredArguments.length%3B%20index%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20if%20(arguments%5BrequiredArguments%5Bindex%5D%5D%20%3D%3D%3D%20undefined)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20throw(requiredArguments%5Bindex%5D%20%2B%20&#8217;%20not%20defined.%20Please%20add%20the%20argument%20with%20&#8211;&#8216;%20%2B%20requiredArguments%5Bindex%5D)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20arguments%3B%0A%7D&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n<h4 id=\"than-just-do\"><span style=\"color: #000000;\">Than just do:<\/span><\/h4>\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;var%20arguments%20%3D%20require(&#8216;.%2Fparse-cli-arguments&#8217;)(%5B&#8217;foo&#8217;%2C%20&#8217;bar&#8217;%2C%20&#8217;xpto&#8217;%5D)%3B%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n<p><label class=\"label label-info\">SOLUTION 10:<\/label><\/p>\n<ul>\n<li><span style=\"color: #000000;\">npm install ps-grab<\/span><\/li>\n<\/ul>\n<h4 id=\"if-we-want-to-run-something-like-this\"><span style=\"color: #000000;\">If we want to run something like this :<\/span><\/h4>\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;node%20greeting.js%20&#8211;user%20Wikitechy%20&#8211;website%20http%3A%2F%2Fwww.wikitechy.com%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;var%20grab%3Drequire(&#8216;ps-grab&#8217;)%3B%0Agrab(&#8216;&#8211;username&#8217;)%20%2F%2F%20return%20%E2%80%98Wikitechy&#8217;%0Agrab(&#8216;&#8211;action&#8217;)%20%2F%2F%20return%20&#8217;http%3A%2F%2Fwww.wikitechy.com&#8217;%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n<h4 id=\"or-something-like\"><span style=\"color: #000000;\">Or something like :<\/span><\/h4>\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;node%20vbox.js%20-OS%20redhat%20-VM%20template-12332%20%3B%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n[pastacode lang=&#8221;javascript&#8221; manual=&#8221;var%20grab%3Drequire(&#8216;ps-grab&#8217;)%3B%0Agrab(&#8216;-OS&#8217;)%20%2F%2F%20return%20&#8217;redhat&#8217;%0Agrab(&#8216;-VM&#8217;)%20%2F%2F%20return%20&#8217;template-12332%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]\n","protected":false},"excerpt":{"rendered":"<p>PROBLEM We have a web server written in Node.js that we would like to launch with a specific folder. Does not sure how to access arguments in JavaScript. Here running node like this: [pastacode lang=&#8221;javascript&#8221; manual=&#8221;%24%20node%20server.js%20folder%0A&#8221; message=&#8221;jQuery Code&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/] [ad type=&#8221;banner&#8221;] Where server.js is the code. $ node -h Usage: node [options] script.js [arguments] [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[275],"tags":[5599,5612,5600,5609,5610,5611,5608,5607,5604,5606,5603,5605,5601,5598,5602],"class_list":["post-2381","post","type-post","status-publish","format-standard","hentry","category-javascript","tag-c-command-line-arguments","tag-c-command-line-arguments-integer","tag-command-line-arguments-in-c","tag-command-line-arguments-in-c-example-with-output","tag-command-line-arguments-in-c-pdf","tag-command-line-arguments-in-python","tag-command-line-arguments-java","tag-command-line-parameters-tutorial-c","tag-command-line-arguments","tag-command-line-arguments-the-java-tutorials-essential-classes","tag-handling-command-line-arguments","tag-how-can-i-pass-a-command-line-argument-into-a-shell-script","tag-javascript-how-do-i-pass-command-line-arguments","tag-related-queries-java-command-line-arguments","tag-windows-how-to-pass-command-line-parameters-to-a-batch-file"],"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/2381","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/comments?post=2381"}],"version-history":[{"count":0,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/2381\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media?parent=2381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/categories?post=2381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/tags?post=2381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}