{"id":226,"date":"2021-11-02T19:53:19","date_gmt":"2021-11-02T19:53:19","guid":{"rendered":"https:\/\/ouritsource.com\/blog\/?p=226"},"modified":"2021-11-02T20:26:06","modified_gmt":"2021-11-02T20:26:06","slug":"example-of-parsing-json-array-from-url","status":"publish","type":"post","link":"https:\/\/ouritsource.com\/blog\/example-of-parsing-json-array-from-url\/","title":{"rendered":"Example of Parsing JSON Array from URL"},"content":{"rendered":"<body>\n<p>Example of Parsing JSON from URL where JSON contains an Array (phoneNUmbers). The data is on ID 57 but shown below: { \u201cfirstName\u201d: \u201cJohn\u201d, \u201clastName\u201d: \u201cSmith\u201d, \u201cage\u201d: 25, \u201caddress\u201d: { \u201cstreetAddress\u201d: \u201c21 2nd Street\u201d, \u201ccity\u201d: \u201cNew York\u201d, \u201cstate\u201d: \u201cNY\u201d, \u201cpostalCode\u201d: 10021 }, \u201cphoneNumbers\u201d: [ { \u201ctype\u201d: \u201chome\u201d, \u201cnumber\u201d: \u201c212 555-1234\u201d }, { \u201ctype\u201d: \u201cfax\u201d, \u201cnumber\u201d: \u201c646 555-4567\u201d } ] }<\/p>\n\n\n\n<div style=\"width:100%; padding-bottom:56.25%; position:relative;\">\n  <iframe src=\"https:\/\/www.ouritsource.com\/apps\/codingexamples\/showcode.php?ref=58\" style=\"position:absolute; top:0px; left:0px; \n  width:100%; height:100%; border: none; overflow: hidden;\"><\/iframe>\n<\/div>\n<\/body>","protected":false},"excerpt":{"rendered":"<p>Example of Parsing JSON from URL where JSON contains an Array (phoneNUmbers). The data is on ID 57 but shown below: { \u201cfirstName\u201d: \u201cJohn\u201d, \u201clastName\u201d: \u201cSmith\u201d, \u201cage\u201d: 25, \u201caddress\u201d: { \u201cstreetAddress\u201d: \u201c21&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-226","post","type-post","status-publish","format-standard","hentry","category-java","no-thumbnail"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/posts\/226","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/comments?post=226"}],"version-history":[{"count":1,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/posts\/226\/revisions"}],"predecessor-version":[{"id":227,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/posts\/226\/revisions\/227"}],"wp:attachment":[{"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/media?parent=226"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/categories?post=226"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/tags?post=226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}