The in
operator only works on objects. You are using it on a string. Make sure your value is an object before you using $.each
. In this specific case, you have to parse the JSON:
$.each(JSON.parse(myData), ...);
maybe you forget to add parameter dataType:'json' in your $.ajax
$.ajax({
type: "POST",
dataType: "json",
url: url,
data: { get_member: id },
success: function( response )
{
//some action here
},
error: function( error )
{
alert( error );
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With