[Vuejs]-WordPress Ajax request using vue

0👍

You need to parse the string returned by PHP to JSON.

Add the following line

$.post(user_obj.ajax_url, request).always(function(response){
   response = JSON.parse(response); // Add this line
   console.log("This is inside vue"  +response[0]);
   console.log("This is inside vue"  +response[0].title);
   app.websites = response;
});
👤cdoshi

Leave a comment