
Nmap Development mailing list archives
Parsing JSON
From: David Muscut <davidmuscut () gmail com>
Date: Mon, 6 Feb 2017 15:21:56 +0200
Can someone point me to a code example of how I can parse out the 'id' and 'title' values using the Nmap json.lua library for the following code: [{"id":1,"date":"2017-02-05T13:02:28","date_gmt":"2017-02-05T13:02:28","guid":{"rendered":"http:\/\/localhost\/wp2\/wordpress\/?p=1"},"modified":"2017-02-05T13:02:28","modified_gmt":"2017-02-05T13:02:28","slug":"hello-world","type":"post","link":"http:\/\/localhost\/wp2\/wordpress\/2017\/02\/05\/hello-world\/","title":{"rendered":"Hello world!"},"content":{"rendered":"<p>Welcome to WordPress. This is your first post. Edit or delete it, then start writing!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to WordPress. This is your first post. Edit or delete it, then start writing!<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/localhost\/wp2\/wordpress\/wp-json\/wp\/v2\/posts\/1"}],"collection":[{"href":"http:\/\/localhost\/wp2\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/localhost\/wp2\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/localhost\/wp2\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/localhost\/wp2\/wordpress\/wp-json\/wp\/v2\/comments?post=1"}],"version-history":[{"href":"http:\/\/localhost\/wp2\/wordpress\/wp-json\/wp\/v2\/posts\/1\/revisions"}],"wp:attachment":[{"href":"http:\/\/localhost\/wp2\/wordpress\/wp-json\/wp\/v2\/media?parent=1"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/localhost\/wp2\/wordpress\/wp-json\/wp\/v2\/categories?post=1"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/localhost\/wp2\/wordpress\/wp-json\/wp\/v2\/tags?post=1"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}] thanks! -D
_______________________________________________ Sent through the dev mailing list https://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Parsing JSON David Muscut (Feb 06)
- Re: Parsing JSON Daniel Miller (Feb 06)
- Re: Parsing JSON David Muscut (Feb 06)
- Re: Parsing JSON Daniel Miller (Feb 06)
- Re: Parsing JSON David Muscut (Feb 06)
- Re: Parsing JSON Daniel Miller (Feb 06)