Title: [Plugin: JSON API] give me an example
Last modified: August 20, 2016

---

# [Plugin: JSON API] give me an example

 *  [jobhesk](https://wordpress.org/support/users/jobhesk/)
 * (@jobhesk)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-json-api-give-me-an-example/)
 * I am trying to code
 * I have read from [http://davidwalsh.name/wordpress-json-plugin](http://davidwalsh.name/wordpress-json-plugin)
   
   and I tried to use the user-friendly permalinks to run a json..
 * I have a custom post type called hkm_aaa
    I want to get the data from a specific
   custom post type and from its post_id
 * how can i do that with this json API?
 * [http://wordpress.org/extend/plugins/json-api/](http://wordpress.org/extend/plugins/json-api/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [jobhesk](https://wordpress.org/support/users/jobhesk/)
 * (@jobhesk)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-json-api-give-me-an-example/#post-3123219)
 * this is what i got so far..
 *     ```
       jQuery.fn.hkmtype_event_indexpage = function() {
       	this.html("");
       	var Dis = this;
       	var url = wsm_base_obj.domainbasejson + "get_recent_posts&post_type=hkmtype_event&order_by=date&order=desc&count=4";
       	jQuery.ajax(url).done(function(jsonlocal) {
       		//eval("var o=" + jsonlocal + ";");
       		if (jsonlocal.status != "ok") {
       			alert("request error... line 75");
       			return false;
       		}
       		var data = jsonlocal.posts;
       		//alert(data.length);
       		for (var i = 0; i < data.length; i++) {
       			h = "<div class=\"item even_poster line\">" + data[i]["title_plain"] + "</div>";
       			//alert(data[i]["title_plain"]);
       			Dis.append(h).click(function() {
       					//alert("this is go");
       			//loop it all
       			});
       		}
       	});
       ```
   
 *  Thread Starter [jobhesk](https://wordpress.org/support/users/jobhesk/)
 * (@jobhesk)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-json-api-give-me-an-example/#post-3123220)
 * this is how I get started..
 * get_recent_posts
    &post_type=hkmtype_event &order_by=date &order=desc&count=4
 * now what can i do to include the feature image url into the json object??

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: JSON API] give me an example’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/json-api.svg)
 * [JSON API](https://wordpress.org/plugins/json-api/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/json-api/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/json-api/)
 * [Active Topics](https://wordpress.org/support/plugin/json-api/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/json-api/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/json-api/reviews/)

## Tags

 * [example](https://wordpress.org/support/topic-tag/example/)

 * 2 replies
 * 1 participant
 * Last reply from: [jobhesk](https://wordpress.org/support/users/jobhesk/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-json-api-give-me-an-example/#post-3123220)
 * Status: not resolved