Title: [Plugin: JSON API] Help with giving a simple example
Last modified: August 20, 2016

---

# [Plugin: JSON API] Help with giving a simple example

 *  [Alitnt](https://wordpress.org/support/users/alitnt/)
 * (@alitnt)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-json-api-help-with-giving-a-simple-example/)
 * Hi
    i am using this plugin. i want to develop a web app showing latest post of
   my weblog with post title and photo using json api. but i dont know how do it(
   sorry)! can anyone give me a code example how to get latest posts and their comments,
   using HTML, CSS, Jquery.
 * [http://wordpress.org/extend/plugins/json-api/](http://wordpress.org/extend/plugins/json-api/)

Viewing 1 replies (of 1 total)

 *  [lego123](https://wordpress.org/support/users/lego123/)
 * (@lego123)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-json-api-help-with-giving-a-simple-example/#post-3075104)
 * This should help you out, it’s the basic ajax call you need. Use firebug or press
   ctrl+shift+j in chrome to view the post object layout.
 *     ```
       $(function(){
       	$.ajax({
           	type:'get',
               dataType:"jsonp",
               url:'http://yourdomain.com/',
               data:{json:"get_recent_posts"},
               success:function(data){
               	if(data)
                   	$.each(data.posts,function(k, v){
                       	console.log(v);
                       });
               }
           });
       });
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: JSON API] Help with giving a simple 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [lego123](https://wordpress.org/support/users/lego123/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-json-api-help-with-giving-a-simple-example/#post-3075104)
 * Status: not resolved