skip to Main Content

how can i print out json in HTML?

I would like to print out data in my html from the link, but it always says "undefined" and I dont know, where is the problem. Can anyone help, please? let url = 'https://ac7minh6n7s3rw4qfchrofbwai0amiko.lambda-url.eu-north-1.on.aws/'; fetch(url) .then(res => res.json()) .then(out =>…

VIEW QUESTION

How can I convert jQuery ajax to fetch?

This was my jQuery code before. Now I want to change it to fetch. function fetch(){ jQuery.ajax({ url: '<?php echo admin_url('admin-ajax.php'); ?>', type: 'post', data: { action: 'data_fetch', keyword: jQuery('#keyword').val(), pcat: jQuery('#cat').val() }, success: function(data) { jQuery('#datafetch').html( data ); }…

VIEW QUESTION
Back To Top
Search